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

# ID Order no Order date Customer name Order amount Order status Actions
1 164 0 0000-00-00 0
2 163 0 0000-00-00 0
3 162 0 0000-00-00 0
4 161 453345 2020-06-25 za 345 completed
5 160 453345 2020-06-25 za 345 a
6 159 453345 2020-06-25 za 345 a
7 158 453345 2020-06-25 za 345 a
8 157 453345 2020-06-25 za 345 a
9 156 453345 2020-06-25 za 345 a
10 155 453345 2020-06-25 za 345 a
# ID Order no Order date Customer name Order amount Order status Actions