Jump to content


Photo

mysql error , curdate() *SOLVED*


  • Please log in to reply
2 replies to this topic

#1 digitalgod

digitalgod
  • Members
  • PipPipPip
  • Advanced Member
  • 374 posts

Posted 23 August 2006 - 10:14 PM

hey guys,

I have this mysql query

<?php
mysql_query("SELECT * FROM events WHERE CURDATE() == date ORDER BY id") or die(mysql_error());
?>

and I get an error saying that it's somewhere here : == date ORDER BY id

I just want it to find all the events that are dated for today. Any reason why it's giving me that error?



#2 hitman6003

hitman6003
  • Members
  • PipPipPip
  • Advanced Member
  • 1,807 posts

Posted 23 August 2006 - 10:14 PM

== is php's equality operator.  Use a single = in SQL.

#3 digitalgod

digitalgod
  • Members
  • PipPipPip
  • Advanced Member
  • 374 posts

Posted 23 August 2006 - 10:28 PM

ah thanks




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users