I used a select_command like:
$a->select_command = "SELECT $t1.Contract, $t1.Name, $t1.Text, $t2.ID, $t2.Model FROM $t1 INNER JOIN $t2 WHERE $t1.Contrat = $t2.Contrat ";
When i search from Name, Text, ID or Model I don't have any problems but I can't search for Contract. When I try it Grid return: "Couldn't execute query. Column 'Contrato' in where clause is ambiguous" […]
Anyone knows why it's not working?
Thank you for helping.
You need to set dbname property to resolve ambiguity.
You can specify exact table.field then it will be used in where clause.
With contrato column,
$col["name"] = "Contrat";
$col["dbname"] = "$t1.Contrat";
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?