MySQL Editor

Go to : Control Panel -> Code Builder -> Your module -> Click button gear -> Edit  -> SQL

At the first time you create module, system will create automatic single query table


Why sximo Creating automatic " WHERE employee.EmployeeId IS NOT NULL " ? this is for prevent error when users submit search form.

Every fields included on query select, will be displaying at grid table including fields from join table. so make sure every field you want to show on table grid and view detail, must be on your query statement

Everytime you made changes with SQL editor , you have to rebuild Files


Working with join Query ( Displaying 2 or more table ) Example Join Query
SELECT customer.*,tb_users.* FROM customer LEFT JOIN tb_users ON customer.staffid = tb_users.id

If we using above statment , Grid table will automatically dispaying all SELECT statment from2 tables. Keep in your mind , althought we can displaying table grid form 2 or more table , form , insert , edit and remove operation only affected for 1 table ( primary table )