The following code outputs in order of 1, 10, 11, 12 of id.
I want to make it 1,2,3,4...
Could anyone tell me what I should do please.
$Q = $
You can do an explicit cast by doing:
ORDER BY CAST(category_id AS UNSIGNED INTEGER)
But you should reconsider you database layout as a field containing only numeric values should also be of an numeric type..
Best wishes, Fabian