How to Left Join command in SQL?

I tried to have a “LEFT Join” command in my connector and it doesn’t work. Am i doing the code right?

<?php
	require("../codebase/connector/grid_connector.php");
	$res=mysql_connect("localhost","root","");
    	mysql_select_db("smct");
	
	$conn = new GridConnector($res);
$conn->render_table("agents,branches","SELECT agents.*,branches.branch_code from agents LEFT JOIN branches ON agents.branch_id=branches.id");
?>

Try to use render_sql instead of render_table

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

Very excellent sir stan, thank you so much however i couldn’t insert data anymore with this command. It displays the left join query works fine but i couldn’t add anymore. It wouldn’t save to the database.

Check - viewtopic.php?f=19&t=52245

When you are using a joined query for data selection, you need to define a separate render_table for data saving, or use custom data saving logic ( server side event handlers or custom sql queries )