I cannot get search to work on fields that are connected via MySQL Inner Join statement. This is referring to the individual column search and the overall search. I receive either an error that the field cannot be found or that the column in the Where clause is ambiguous.
The column search works only for columns that are part of the referenced table. See below.
Here is the SQL statement.
$g->select_command = “SELECT s.id, s.inputtags, s.interlock, s.statusin, s.outputtag, s.statusop, s.failposition, s.sdaction1, s.sdaction2, s.timedelay, s.remarks, s.notes, s.inputrev, s.outputrev, i.sdkitemnoinput, i.servicedescription, i.pid, o.sdkitemnooutput, o.servicedescription as opservicedescription, o.pid as oppid, Left(s.inputtags,2) as testcolumn
FROM tblsdkrelation s
INNER join tblindex i on s.inputtags = i.tag
INNER join tblindex o on s.outputtag = o.tag
// this db table will be used for add,edit,delete
$g->table = “tblsdkrelation”;
You need to use dbname property of column to resolve ambiguity: e.g. i.servicedescription
$col[“name”] = “servicedescription”;
$col[“dbname”] = “i.servicedescription”; // table.field style
Abu Ghufran - Dev Team
PHP Grid Framework
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?