$query = "SELECT * FROM `tele`.`pedidos`
WHERE `data` LIKE '".date('d/m/Y')."';";
How can I order this by any column? I try:
$query = "SELECT * FROM `tele`.`pedidos`
WHERE `data` LIKE '".date('d/m/Y')."
ORDER BY numero DESC';";
But doesnt work…
Any suggestion?
I bet you are getting syntax error exception right? It’s because you lack single quote after the value of date. Try this for clearer view,
if you are searching for a specific date, use
=notLIKEbecause it’s for pattern matching