mysql_result() problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux