What's wrong in my code?


$connessione=mysql_connect($mysql_server, $mysql_user, $mysql_password);

$grid = new GridConnector($connessione,“MySQL”);
$grid->set_options(“IdCausaleCont”, array(“1” => “47”));

This code load all data, not only the selected (with IdCausaleCont = “47”).

set_options is used to define collection of options for grid or scheduler, it can’t be used for data filtering.

You can change your code as

$grid->render_table("Select * from $mysql_table where IdCausaleCont = 4","id","Cfm,Sottoconto,DareAvere,IdCausaleCont");

This code produce this query:

SELECT id,Cfm,Sottoconto,DareAvere FROM SELECT * FROM contropartite WHERE IdCausaleCont = 48;

Are you sure that it’s correct? Mysql have another idea about query… :wink:

to the

If i use render_sql the dataprocessor change the id of the row and it’s bad!

change the id of the row and it’s bad!
Can you provide some more details?

I’ve found the problem. The field name is case sensitive. If i use ID is different from id (for DHTMLX, not for MySQL)