PDOCrud sql operation

Render sql helps to display the data in grid/table format. You can write sql select statement to display data in the grid format. Please note that since sql statement can be of any type so the default grid function will not work with this sql render. From version 2.4, the pagination, records per page and display of total records is also removed. A better option to use the sql render with the jquery datatable plugin. You can see example here

  
                                 $pdocrud = new PDOCrud();
                                $pdocrud->setQuery("select * from orders");                
                                echo $pdocrud->render("SQL");
                                

# ID Order no Order date Customer name Order amount Order status
1 172 27 2025-11-04 5006 67
2 173 33 2025-09-02 Cooper Jensen 1112 Completed
3 174 0 0000-00-00 Cooper Jensen 10
4 176 0 0000-00-00 10
5 178 33 2025-09-02 Deacon Tyson 111 ok
6 179 33 2025-09-02 Deacon Tyson 111 ok
7 182 1 2025-07-01 Deacon Tyson 82325 Pending
8 184 576749678 2025-09-03 Cooper Jensen 798797 asdas
9 185 0 0000-00-00 Xenos Clarke 0 1
10 186 -1 2025-10-02 Cooper Jensen 0 ??
11 187 34 2025-10-16 111 g
12 188 4343 2025-10-16 4 r
13 189 0 0000-00-00 0
14 190 27 0000-00-00 Xenos Clarke 500 67
15 191 28 0000-00-00 Xenos Clarke 500 67
16 193 234234 0000-00-00 32????? 34 ?????
# ID Order no Order date Customer name Order amount Order status