mysql_result() problem

From: Date: Wed, 09 Apr 2003 13:16:51 +0000
Subject: mysql_result() problem
Groups: php.db 
Request: Send a blank email to php-db+get-26953@lists.php.net to get a copy of this message
Hi, I have the following query which works fine when I enter it directly to the MySQL Database: SELECT DISTINCT MONTH(B.Booking_Date) FROM WMS_Fields F, WMS_Data D, WMS_Bookings B WHERE F.Project_ID = ' 1' AND F.Field_ID = D.Field_ID AND B.Booking_ID = D.Booking_ID ORDER BY B.Booking_Date; However when i try to perform this command: $month = mysql_result($result, $i, Booking_Date); I get the following error: Warning: Booking_Date not found in MySQL result index 3 in /home/w/o/workmanagement/public_html/view_data.php on line 88 I think this must be something to do with the fact I using the MONTH command in my query but I am not sure how to work around this, any ideas?

« previous php.db (#26953) next »