Bizzare error
| From: | shaun | Date: | Tue, 22 Apr 2003 14:06:59 +0000 |
| Subject: | Bizzare error | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-144821@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);
$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 would be very grateful if someone
could point out what i have done wrong here.