Re: Bizzare error
| From: | Chris Hayes | Date: | Tue, 22 Apr 2003 14:14:14 +0000 |
| Subject: | Re: Bizzare error | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-144823@lists.php.net to get a copy of this message | ||
At 16:06 22-4-03, you wrote:
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
i use to do FROM tablename AS A, tablename2 AS B
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);
to see the error message do this:
$result = mysql_query($query) or die ('Query failed, MySQL says: '.mysql_error().' in '.__FILE__.' line '.__LINE__)