Insert, Delete and View Data

Good day, i am having some trouble when inserting data to the server. The display works fine but when i try to insert it the code for insertion of data, it won’t display anything. Is my code correct? Any help would be grealy appreciated.

$conn = new GridConnector($res); $conn->render_sql("SELECT agents.*,branches.branch_code from agents LEFT JOIN branches ON agents.branch_id=branches.id", "id", "full_name,contact_number,address,branch_code"); $conn->render_table("agents","id","full_name,contact_number,address,branch_id"");

You need to use a bit different code, something like next

$conn = new GridConnector($res); if ($conn->is_select_mode()) $conn->render_sql("SELECT agents.*,branches.branch_code from agents LEFT JOIN branches ON agents.branch_id=branches.id", "id", "full_name,contact_number,address,branch_code"); else $conn->render_table("agents","id","full_name,contact_number,address,branch_id"");

As you can see the is_select_mode check allows to use different commands for different types of operations.

Thank you stan. Works perfectly.