It only works with this trick
SELECT
movies.movieid,
movies.title,
movies.year,
movies.imdbid,
CAST ( SUBSTRING ( movies.title FROM '#(\d+)\.\d+' ) AS INT ) AS major,
CAST ( SUBSTRING ( movies.title FROM '#\d+\.(\d+)' ) AS INT ) AS minor
FROM
movies
WHERE
movies.title ILIKE ('%$risultato%')
ORDER BY major, minor
and inserting this without any reference with the field (number, it does not exist in the query)
<td><?php echo $row->numero; ?></td>
in datatables
"order": [[ 3, "asc" ]],
Only in this way orders correctly,
But I don't understand the logic, since the number does not exist 🙄
anyway thanks 😉
result