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 149 435 2020-01-20 ret 0 ret
2 148 435 2020-01-20 ret 2 ret
3 147 3545 2020-01-09 wer 2354 0,1
4 146 0 0000-00-00 0
5 145 56782 2020-01-10 jay 27383 ok
6 144 56782 2020-01-10 jay 27383 ok
7 143 0 0000-00-00 0
8 142 8878 2020-01-01 689itgy 986878678 86678968
9 141 1 2019-04-01 a 1 Pending
10 140 1 2019-04-24 111 1 1
# ID Order no Order date Customer name Order amount Order status Actions