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

# ID Order no Order date Customer name Order amount Order status Actions
1 145 111121 2018-12-12 Balaji Jayaraman 111 pending
2 144 578112 2016-09-30 Xenos Clarkeaa 944 Pending
3 143 2 2018-12-05 a 2 3
4 142 578112 2016-09-30 Xenos Clarkeaa 944 Completed
5 141 33 2018-12-19 John 11 Completed
6 140 578111 2016-09-30 Xenos Clarkeaa 944 Completed
7 138 444 2016-12-01 ppp 10 0
8 135 1 2016-12-15 qsd 0 0
9 134 20 2016-12-07 ason 200 ok
10 131 2222 2016-12-08 sdfsdfc 0 yxcyxc
# ID Order no Order date Customer name Order amount Order status Actions