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

# ID Order no Order date Customer name Order amount Order status Actions
1 11121 0 0000-00-00 0
2 11120 0 0000-00-00 fghdfgh 0
3 11119 74040 2016-09-10 Xenos Clarke 52 Completed
4 11118 0 0000-00-00 0
5 11117 1 2021-05-05 cmc 444 333
6 11116 1 0000-00-00 1 1 1
7 11115 0 0000-00-00 0
8 11114 1 2022-06-18 cxcxc 0 cxcx
9 11113 0 0000-00-00 0
10 11111 87594 2016-09-08 Xenos Clarke 77 Pending
# ID Order no Order date Customer name Order amount Order status Actions