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

# ID Order no Order date Customer name Order amount Order status Actions
1 142 578 2016-09-30 Xenos Clarke 943 Completed
2 141 1 2019-04-01 a 1 Pending
3 140 1 2019-04-24 111 1 1
4 138 444 2016-12-01 ppp 10 0
5 135 1 2016-12-15 qsd 0 0
6 134 20 2016-12-07 ason 200 ok
7 131 2222 2016-12-08 sdfsdfc 0 yxcyxc
8 128 5 2016-09-09 44 55 33
9 99 21141 2016-09-08 Liberty Gomez 32 Completed
10 98 81261 2016-09-08 Abel Floyd 43 Completed
# ID Order no Order date Customer name Order amount Order status Actions