Skip to content

How to view Sql generated during CRUD?

The following guide helps one to debug any SQL generated in the back-end on any *inx system by the phpGrid. The person must have admin access permission.

1. Turn on MySQL (or whatever database you use) logging (the sample uses MySQL)
mysql.server restart --general_log=1 --general_log_file=/usr/local/var/mysql/my.gen.log

2. Update values on the datagrid on the page

3. Review the SQL Update or Insert generated in the log file or use Tail command 
tail -f /usr/local/var/mysql/my.gen.log

For an alternative approach (one without admin permission), please see this KB

Feedback and Knowledge Base