I have numbers like this: 666/2014, 01/2014, 1/2014, 02/2014, 125/2014, 06/2014 ...etc as STRING named 'n_inscription' in database. I want to retrieve those strings In ORDER from database
I used this:
$sql_students = $bd->query("SELECT * FROM `es_student_infos`
WHERE school_year='$school_year'
ORDER BY right(n_inscription, 4) * 1,
substring_index(n_inscription, '/', 1) * 1");
I get result like this: 01/2014, 02/2014, 06/2014, 1/2014, 125/2014, 666/2014
and the result I'm looking for is like this: 01/2014, 1/2014, 02/2014, 06/2014, 125/2014, 666/2014
any suggestion please?