Try this instead: SELECT *, DATE_FORMAT(appointment.startdatetime, '%m-%d-%y') AS yrappt FROM appointment LEFT JOIN guest USING (appointment_id)
That should work, but I donšt know what your table is like so I can only guess all the required elements are there. Rick "Every person you meet - and everything you do in life - is an opportunity to learn something." - Tom Clancy > From: "Alexander P. Javier" <[EMAIL PROTECTED]> > Date: Mon, 25 Feb 2002 15:40:47 -0800 (PST) > To: [EMAIL PROTECTED] > Subject: [PHP] MySQL joins > > > the query is: > > select appointment.*, date_format(appointment.startdatetime,'%m-%d-%Y') as > yrappt from appointment left join guest on appointment.appointment_id = > guest.appointment_id > > > i think it's syntactically correct, it returns the correct rows when run with > the mysql.exe program but gets an error when run thru my php code in a > browser. > > by the way, i use apache-php-mysql for windows. and i program locally. please > HEEEELLLLPPPP!!!! =( > > > alyx > > > > --------------------------------- > Do You Yahoo!? > Yahoo! Sports - Coverage of the 2002 Olympic Games -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php