Is it possible to select the grid data from joined relational database tables,
then any updates in the grid get inserted into a totally new a relational database table?
Example
// join tables for grid display
$g->select_command = “SELECT i.id, invdate , c.name, i.note, i.total, i.closed FROM invheader i INNER JOIN clients c ON c.client_id = i.client_id”;
// then save any updates to a new table.
$g->table=”another_table”;
1 Answers
Hi,
Yes, that’s doable. You can have your custom insert query code as well and skip the default working of datagrid library.
You can check on_insert / on_update / on_delete events from this link: https://www.gridphp.com/docs/grid-events/
Your Answer