Unknown column 'department_id' in 'where clause'
Could anyone help me?
Thanks in advance.
⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠
Posted 01 March 2016 - 18:19 PM
Unknown column 'department_id' in 'where clause'
Could anyone help me?
Thanks in advance.
Posted 02 March 2016 - 04:59 AM
Try icing along the table name of the department_id .. it may not belong to the same table on which the primary query is being fired. It may help you accordingly.
Posted 02 March 2016 - 18:19 PM
Hi Amit, Thanks for your fast answer. I've tried that before post the topic. Doesn't work either.
Posted 03 March 2016 - 09:00 AM
can u share the whole piece of code -- looking at the same, may be able to give some solution..!!
Posted 03 March 2016 - 11:28 AM
Hi Amit,
This is the basic code and it's working for the add and edit views, but not for the list view. I want to filter by departamento_id
$crud = new grocery_CRUD(); $crud->set_table('expedientes'); $crud->set_subject('Expedientes'); $where = "departamento_id = 1"; $crud->set_relation_n_n('departamentos','exped_depar','departamentos','expediente_id','departamento_id','name', null, $where); $output = $crud->render();
Thanks
Posted 03 March 2016 - 12:24 PM