im upgrading mysql 4.x -> 5.x.
and in my php source there is mysql synxtax following.
$pt_sql = "select * from orderlist
where condition!='delete'
and left(date,10)='$nday'
group by id ";
how can i change above mysql syntax to mysql 5.x syntax?
if anyone help me much apprecate!
thanks in advance
CONDITIONis a reserved word in MySQL 5.0 (it was not in 4.1) so it must be in backticks in your queries:You may also want to consider storing the column
dateas adateor storing it asdatetimetype and using the DATE function.