Page 1 of 1

Query Not Executing Correctly

Posted: Wed Sep 22, 2004 4:13 am
by Harlequin
Morning all.

I've looked at this until I'm blue in the face and for some reason can't see the problem.

My query returns an error saying it is empty but I know the values exist in the table. Can anyone see what I'm missing...?

Code: Select all

$Query = mysql_query("SELECT * FROM events
   WHERE EventCode == 'PMJ';
   ORDER BY EventTime DESC");
   $Data = mysql_query($Query) or die("Error: " . mysql_error());
   while($row = mysql_fetch_array($Query))
Thanks for taking a look.

Posted: Wed Sep 22, 2004 4:25 am
by timvw
compare operator in SQL is "=" not "=="

wrong forum

Posted: Wed Sep 22, 2004 5:21 am
by phpScott
this was posted in the wrong forum but I see that you did post in the correct forum.
the mod's will notice.
It is possible to delete your post if you view it and you are the owner or the post.

posted answer in other forum

Posted: Wed Sep 22, 2004 10:47 am
by feyd
no cross posting.

original thread: viewtopic.php?t=26197