I have a query in mysql
When I do it through PHP, I simply ignore the ordering as I need it (whatever field I try to order it from).
The problem is in PHP that's why I pass the code that I have to call that query:
$diaActual = date("Y-m-d");
$sql = "SELECT
id,
DATE_FORMAT(fec_dde, '%d-%m-%Y') AS fec_dde,
DATE_FORMAT(fec_hta, '%d-%m-%Y') AS fec_hta,
tit_eve,
organiz
FROM eventos
WHERE (fec_hta >= '$diaActual')
ORDER BY tit_eve;";
$resultado = $mysqli->query($sql);
much more below I load a table and I cross the data doing:
<?php
while($row = $resultado->fetch_array(MYSQLI_ASSOC)) {
?>
Can someone give me a hand?
the query in mysql and the same query with the same sorting criteria in the php page ...