hello im trying to join two table in select query and im using two dropdown select and each one is for similar table but when trying to add new record this message is appear : Couldn\’t execute query. Unknown column \’Cat_Nm\’ in \’field list\’ – INSERT INTO details (`Cat_Nm`,`ModelNo`,`TempNo`,`Cat_Type`,`price`,`photo`) VALUES (\’\’,\’345\’,\’543\’,\’543\’,\’45\’,\’photos/IMG-20170815-WA0048_2.jpg\’) and this this my select query : $g->select_command = \”Select d.id , d.price , d.TempNo , d.ModelNo , d.cat , d.Notes , d.Cat_Type , photo , c.Client_nm , t.Name as Cat_Nm from details d inner join clients c on d.ClientName = c.Client_nm inner join category t on d.cat = t.Name\”;
Cat_Nm field is field alias and does not exist in table. So for insert you need to use real field name in ‘name’ property. e.g.
$col[“name”] = “cat”
Abu Ghufran - Dev Team
PHP Grid Framework
How useful was this discussion?
Click on a star to rate it!
Average rating / 5. Vote count:
We are sorry that this post was not useful for you!
Let us improve this post!
Thanks for your feedback!