I have been trying to run this MySQL query using PHP:
SELECT id, trans_type, remote_addr, DATE_FORMAT(tim e, '%M %e, %Y %r') as time
FROM transactions WHERE client_id = " . $client_id . " ORDER BY time asc
and I am getting this error message:
MySQL Error number: 1064: You have an error in your SQL syntax near 'ORDER BY time asc' at line 2
I added the "as time" in hopes it wasn't seeing the 'DATE_FORMAT()' field as the time field.
Does anyone have any advice?
Thanks in advance,
Rick Barnes
SELECT id, trans_type, remote_addr, DATE_FORMAT(tim e, '%M %e, %Y %r') as time
FROM transactions WHERE client_id = " . $client_id . " ORDER BY time asc
and I am getting this error message:
MySQL Error number: 1064: You have an error in your SQL syntax near 'ORDER BY time asc' at line 2
I added the "as time" in hopes it wasn't seeing the 'DATE_FORMAT()' field as the time field.
Does anyone have any advice?
Thanks in advance,
Rick Barnes
Comment