Mustafa Khalil asked 2 months ago

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.price , d.TempNo , d.ModelNo , , 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 = t.Name\”;

3 Answers
Abu Ghufran Staff answered 2 months ago


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
Mustafa answered 2 months ago

I\’ve tried using real field name but it still appear same error

Abu Ghufran Staff answered 1 month ago

Your ticket somehow get delayed. If your issue still exist, please send complete code and database dump to regenerate issue here.

Good practice in debugging would be to run this query on sql ide (e.g. phpmyadmin) and correct what is missing then paste expected query here.

Abu Ghufran - Dev Team
PHP Grid Framework
Your Answer

8 + 17 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.

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!