Jump to content

Kush

Members
  • Posts

    39
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Kush's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Kush

    Time Limit

    I tried making the field as TIMESTAMP, but somehow it adds an "ON UPDATE" and uses the current timestamp for that.. is there a way to disable that?
  2. Kush

    Time Limit

    I was a bit confused by his retrieve example because it's saying "timestamp > NOW()". I don't want to select the timestamp that's greater than now. I'm basically wanting to create a timer and I'll be checking my database every minute to check and see if any timers have expired. By using "timestamp > NOW()" isn't that going to select everything then since it would all be set 4 hours and 10 minutes into the future?
  3. Kush

    Time Limit

    Can people read this?
  4. Kush

    Time Limit

    Well, I plan on updating the field in certain events and with the "timestamp" field it has an on update which it does the current timestamp again. I'm creating my tables in php and just executing the query from php. How would I populate the timestamp field from a mysql query.. the same as above? For retrieving how would I pull all of the rows where the timestamp has expired? I'm trying to make a count-down timer for something (the timer lasts 4 hours and 10 minutes. I guess I was hoping for more php code instead of mysql? I'm still confused.
  5. Hi, I'm fairly new to all of this and I'm not quite sure what to do. I'm trying to create a field in my database that's 4 hours and 10 minutes into the future from the current time. What data type do I set my field as in the mysql database? How would I populate that mysql field via php.. would I use something like NOW(), or use the php date() function? Also, how would I be able to tell if my field has "expired" (the 4 hours and 10 minutes has elapsed)?
  6. Since I can't edit I tried to post a new topic explaining better and I get a warn.. awesome now site admin is mad at me. :'(
  7. Kira, storing the time in a unix_timestamp isn't possible. I can only store the timestamp using a mysql timestamp field using the NOW() function. I'm passing my timestamp to a function called isActive(). This is what I have so far.. function isActive($timestamp) { // Below is equal to the int 300 //MAX_RESPONSE_TIME }
  8. For example, my current mysql timestamp field uses the NOW() function (says so in phpmyadmin) and the current value in the field is "2011-02-22 22:25:51". Now that's going to change and I'm trying to figure out if the current time is within 300 seconds of that time. How could I do this?
  9. I don't even know where to start at..
  10. Hi, I have a timestamp mysql field that I'm trying to see if something happened within a time limit. The field is updated with the time when the action is complete so I just need to figure out how to see if it's within a time. I currently have a defined variable set titled "MAX_RESPONSE_TIME" and that's in seconds. By default "MAX_RESPONSE_TIME" is equal to 300 seconds. How can I see if a mysql timestamp field is within 300 seconds?
  11. Kush

    PHP Question

    Think it will be able to handle what I need?
×
×
  • 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.