PDOCrud Order by ascending and descending

You can get the data order by ascending and descending by using dbOrderBy function.

  
                    $pdocrud = new PDOCrud();
                    $pdocrud->dbOrderBy("id desc");//descending    
                    //$pdocrud->dbOrderBy(array("id desc","order_no desc"));//pass in array                                 
                    echo $pdocrud->dbTable("orders")->render();
                        

Orders

Showing 1 to 10 of 124 entries

# ID Order no Order date Customer name Order amount Order status Actions
1 230 8 2020-04-01 a 0 ,0,1
2 229 0 0000-00-00 0
3 228 7888 2020-04-10 RENAUD 10999 OK
4 227 0 0000-00-00 0
5 226 123 2020-04-01 name 0 0,1
6 225 0 0000-00-00 0
7 223 0 0000-00-00 0
8 222 0 0000-00-00 2 23
9 221 1 2020-04-08 Test 1 1
10 220 94701 2016-09-08 Xenos Clarke 25 Completed
# ID Order no Order date Customer name Order amount Order status Actions