1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Mysql table/PHP question help

Discussion in 'General PHP and MySQL Discussions' started by Kirk, Oct 12, 2013.

  1. Kirk

    Kirk Well-Known Member

    Hey everyone,

    So as you guys might of seen i'm trying to attempt to make a quiz add-on for xenForo. Right now I'm trying to work on creating the tables for the addon and i'm having trouble on how i should go about trying to implement the timer for the adddon. I thought it would be a decimal type or a tiny int.

    If someone could help me i would greatly appreciate it. :)
     
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    If you are running a timer, you should be doing it client side and not server side. However, if you want to guarantee you receive an answer in a specific amount of time, you could store a start time and an end time in a UNIX time stamp and then use time() to compare between the two.
     
  3. AndyB

    AndyB Well-Known Member

    As Jeremy said, store a UNIX time stamp. Your date field(s) will need to be a int(10).
     
  4. Kirk

    Kirk Well-Known Member

    Thank you for the responses guys.
     

Share This Page