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 73 entries

# ID Order no Order date Customer name Order amount Order status Actions
1 148 0 0000-00-00 0
2 147 547 0000-00-00 ujj 6747 ghjgj
3 146 5 2019-08-08 mhvjbmhm 223 xvbcbc
4 145 143 2019-08-22 test 120 Ordered
5 144 143 2019-08-22 test 120 Ordered
6 143 143 2019-08-22 test 120 Ordered
7 142 2147483647 2019-08-01 reqrewqr 0 rqewrewqr
8 141 1 2019-04-01 a 1 Pending
9 140 1 2019-04-24 111 1 1
10 138 444 2016-12-01 ppp 10 0
# ID Order no Order date Customer name Order amount Order status Actions