Skip to content
Advertisement

How to order by use in codeigniter

My table data is like that

ID NAME order
1 English 0
2 Italian 1
3 Spanish 2
4 Hindi 1
5 Bengali 3
6 Tamil 2

my query

JavaScript

I want data like this order-1,1,2,2,3,0

ID NAME order
2 Italian 1
4 Hindi 1
3 Spanish 2
6 Tamil 2
5 Bengali 3
1 English 0

Advertisement

Answer

Try this:

JavaScript

enter image description here

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement