Jump to content

Date Function Help


rajaahsan

Recommended Posts

i just want to display the values form database which i have saved before and just want to be displayed when specific time comes as i told above in e.g

 

if i have stored some thing like value let say ( 10,20,30,40 and so on ) in database

now i just want a php code to display it on site but on specific time only like this,

 

i time = 10:00am display value = 10

when time = 10:30am display value = 20

when time = 11:00am display value = 30

 

and so own simple.

Link to comment
Share on other sites

Hmm, I really don't understand what you are trying to accomplish or the logic you are applying. If 10:00am = 10, and 10:30am = 20, etc. (i.e. every 30 minutes is 10 units). Then does 8:00am = -30?

 

Also, what type of field is the data stored in the database?

Link to comment
Share on other sites

what should i do if i want to display the record like this with data and time both,

database value is 10,20,30,40

Site output should be like this let say,

 

date-------------------time-------------------value

12-04-11--------------3:00 pm---------------10

12-04-11--------------3:30 pm---------------20

12-04-11--------------4:00 pm---------------30

12-04-11--------------4:30 pm---------------40

 

give me code thanks with comments

Link to comment
Share on other sites

give me code thanks with comments

 

Well, that's a bit presumptuous of you isn't it? Why should I just give you code? You now state the DB value is 10, 20, 30, etc. but the original post seemed to state the opposite. Plus, you don't state where the data value is supposed to come from.

 

Also, your last post shows 9:30am with a value of 10 and your first post stated 10:00am should have a value of 10. You really aren't making any sense.

 

It *LOOKS* like you may simply want the first record to have a value of 10 and each successive record to have a value +10 from there. I'm not going to spend any time writing code if you can't adequately explain what you are trying to achieve.

Link to comment
Share on other sites

i just want a simple code which does this,

      1. Takes my form values(values can be char,int  e.g 10,20,30) and save them in database.

      2. Then value that has been saved before, i want to be displayed those values when the specific time comes,e.g if server time is let say

            10:00am display my value which is 10 , then when time is 10:30 display my second value automatically in to 20 and so on...

        note : i just have to enter my values(10,20,30,40...) one time let say for all the week from 10:00am to 4:00pm daily bases. but those values are to be displayed on there accurate time as explained earlier.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.