couldnt-execute-query-unknown-column-cat_nm-in-field-list

Questionscouldnt-execute-query-unknown-column-cat_nm-in-field-list
Mustafa Khalil asked 2 weeks 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.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\”;

2 Answers
Abu Ghufran Staff answered 2 weeks ago

Hi,

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 weeks ago

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

Your Answer

6 + 4 =

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!