Jump to content


Photo

Quick Question


  • Please log in to reply
1 reply to this topic

#1 steelmanronald06

steelmanronald06
  • Staff Alumni
  • Advanced Member
  • 2,004 posts
  • LocationOk

Posted 22 June 2006 - 07:43 PM

Yeah, I rarely ever post for help but here I am. I don't mess much with mysql queries, I perfer ADODB, but I have a damn mysql query.

$get_forumers_online = mysql_query("SELECT * FROM forum_members WHERE lastLogin < 15 MINUTES");
$num_forumers_online = mysql_num_rows($get_forumers_online);
echo "Total Online: $num_forumers_online <br />";


[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MINUTES' at line 1
[/quote]



#2 jvrothjr

jvrothjr
  • Members
  • PipPipPip
  • Advanced Member
  • 300 posts
  • LocationOhio

Posted 22 June 2006 - 07:53 PM

its picky on single and doule quote
$get_forumers_online = mysql_query("SELECT * FROM forum_members WHERE lastLogin < '15 MINUTES'");


If you understand everything you know nothing!

http://rcchjr.awardspace.com/




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users