I need to fetch MySQL table value using one order using MySQL and PHP. I am providing my table below.
db_cat:
id cat_name cat_id order_no
1 aaa 10 1
2 ggg 10 30
3 fff 10 11
4 sss 10 12
5 ddd 10 5
Here I am trying to fetch data as per order_no column value by using the query :
select * from db_cat where cat_id='10' order by order_no asc
but it is giving me the wrong order data like(11,12,30,1,5) where I should get the data like this order(1,5,11,12,30).
my order_no datatype is varchar.
order_nodatatype toint