I am writing in PHP a select statement and storing the restults.
When i write the following query the web page works fine:
$result=@mysql_query("select dateadd, rec_id, filename from orders"
But when i want to change the format of the date as it appears on the page using the following statement, the page doesn't work and gives an error.
$result=@mysql_query("select DATE_FORMAT(dateadd, "%e %M %Y" as dateadd, rec_id, filename from orders"
this select statement does work if i login to MYSQL on the server.
is what i am doing ambiguous? am i making a silly mistake? is there a better way of doing this?
When i write the following query the web page works fine:
$result=@mysql_query("select dateadd, rec_id, filename from orders"
But when i want to change the format of the date as it appears on the page using the following statement, the page doesn't work and gives an error.
$result=@mysql_query("select DATE_FORMAT(dateadd, "%e %M %Y" as dateadd, rec_id, filename from orders"
this select statement does work if i login to MYSQL on the server.
is what i am doing ambiguous? am i making a silly mistake? is there a better way of doing this?