Bizzare Error

From: Date: Tue, 22 Apr 2003 16:18:45 +0000
Subject: Bizzare Error
Groups: php.db 
Request: Send a blank email to php-db+get-27259@lists.php.net to get a copy of this message
Hi, I am completely foxed by this: $query = "SELECT A.*, B.*, U.User_ID FROM WMS_Allocations A, WMS_Bookings B, WMS_User U, WMS_Projects P WHERE A.User_ID = B.User_ID AND A.User_ID = '".$ses_user_id."' AND B.Booking_Start_Date >= '".$_GET[booking_date]."' AND B.Booking_End_Date <= '".$booking_end_date."'"; echo "query = $query<br>"; $result = mysql_query($query) or die ('Query failed, MySQL says: '.mysql_error().' in '.__FILE__.' line '.__LINE__) $num = mysql_num_rows($result); echo "num = $num<br>"; if($num != 0){ //..... $num is zero, but it shouldn't be and when i cut and paste the query directly into mysql i get loads of rows. I also get no error messages. I would be very grateful if someone could point out what i have done wrong here. P.S. This message has been posted in PHP general but i was asked to post it here so please don't attack me for cross posting!

« previous php.db (#27259) next »