Like everyone I populate grids using the grid.locad(“connector.php”);
Where “connector.php” is something like:
$sql = “SELECT, … JOIN … WHERE … ORDER BY … etc”;
$grid = new GridConnector($res);
$grid->dynamic_loading(100);
$grid->render_sql($sql,“key”," … fields");
UNFORTUNATELY, IF the sql is at all complicated (i.e. joins, etc…), all the grid filtering and sorting commands stop working
eg.
ordGrid.attachHeader("#connector_select_filter,…
ordGrid.setColSorting("connector,…
The only way I have found round this problem is to create a view, with all the joins, and then give the sql “SELECT * FROM view …”. Unfortunately, as the tables get bigger, performance gets worst.
The strange thing is that sometimes the sql I put gets refused by the connector as in error, whereas exactly the same statement runs fine when used directly against mysql.
Can you give any suggestions?