Hi all,
categories_id (PK,AI),categories_name(varchar(150)), categories_order(int), categories_image(varchar(100)), categories_status(int)
This is my table structure. My server side language is PHP. User has to insert values to this table where categories_order(int) is optional. If the user miss categories_order(int) then it will be filled with zero. On select query, all rows must to sorted with categories_order(int) in ASC ( as SELECT * FROM `categories` order by `categories_order` asc ) but when I execute the query, categories_order with zero's ( where users didn't fill the order field )comes on the top.
I want to sort the table such a way that rows with category_order will be show at top in ASC then it should show other rows ( where category_order is zero ) with category_name in ASC.
How can I achieve this ? Thank you for the interest