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

# ID Order no Order date Customer name Order amount Order status Actions
1 138 444 2016-12-01 ppp 10 0
2 135 1 2016-12-15 qsd 0 0
3 131 2222 2016-12-08 sdfsdfc 0 yxcyxc
4 128 5 2016-09-09 44 55 33
5 99 21141 2016-09-08 Liberty Gomez 32 Completed
6 98 81261 2016-09-08 Abel Floyd 43 Completed
7 97 74732 2016-09-08 Aristotle Harris 62 Completed
8 96 93197 2016-09-08 Quemby Floyd 88 Completed
9 95 12336 2016-09-08 Teegan Jimenez 26 Completed
10 94 92194 2016-09-08 Ivy Vazquez 81 Completed
# ID Order no Order date Customer name Order amount Order status Actions