Jump to content


Photo

Using more than with WHERE


  • Please log in to reply
2 replies to this topic

#1 Millar

Millar
  • Members
  • PipPipPip
  • Advanced Member
  • 40 posts
  • LocationSouthampton, UK.

Posted 18 August 2006 - 01:14 PM

I have this piece of code to see if a user was active in past 15 mins.
mysql_query ( "SELECT * FROM reg WHERE lastactive>='" . date ( "U" ) - 900 . "'" );

But this code doesn't work, how could I query using more than?

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 18 August 2006 - 01:38 PM

... lastactive >=  ' ....
Legend has it that reading the manual never killed anyone.
My site

#3 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 18 August 2006 - 04:11 PM

Or you could use the MySQL NOW() function.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users