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 152 123 2019-02-01 Bommel 45 well done!
2 151 4 2019-02-05 ggg 4 fff
3 150 409999 2019-02-07 gé"ger 34 vrea
4 149 309999 2019-02-07 gé"ger 34 vrea
5 148 30 2019-02-07 gé"ger 34 vrea
6 147 342 2019-02-07 gé"ger 34 vrea
7 146 152447 2019-02-01 aaasss 55 ww
8 145 11 2019-02-06 123 12 123
9 144 0 2019-02-14 sgaggsa 0 asggsa
10 143 76778 2016-09-08 X 77 Pending
# ID Order no Order date Customer name Order amount Order status Actions