Jump to content

jakzodiac

New Members
  • Posts

    5
  • Joined

  • Last visited

jakzodiac's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Awesome, working out the last of the bugs. Thank you so much Barand!
  2. Okay, that worked. It returns the following. 1337870.6667 When the query returns this value, can it be formatted? I tried to apply different datetime formats and couldn't get any to work. Is this because it is returned as a variable? Lastly, thank you for the help so far. Way more helpful than stackexchange. They kept turning down my questions.
  3. Okay, so I tried it out, and I'm getting a blank. Is that compatible with DateTime? I think something is wrong with the query.
  4. I'm still kind of a noob. How would I implement that properly?
  5. First off...Hi everyone, I'm hoping you all can help. I'm working on a script that stores datetimes of users logging in and out of a system. I've found out how to get the time the user was logged in using the following code. $q = "SELECT * FROM VISITOR WHERE MONTH(timeIn)=MONTH(NOW()) ORDER BY id"; $monthsVisitors = mysql_query($q); while($row = mysql_fetch_array($monthsVisitors)) { $timeIn = $row['timeIn']; $timeOut = $row['timeOut']; $timeDiff = dateDiff($timeOut, $timeIn); } Assuming I store hundreds of entries in the "Visitor" table, with each row containing a "timeIn" and "timeOut". What would be the best way to get an average of "$timeDiff"?
×
×
  • 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.