Hi!
$crud->set_relation('seo_url', 'db_projects','seo');
On insert/update crud add id (primary key ) from db_projects to seo_url field. How can I add seo from db_projects not id (primary key) to seo_url field?
⚠ 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 03 February 2013 - 14:42 PM
Hi!
$crud->set_relation('seo_url', 'db_projects','seo');
On insert/update crud add id (primary key ) from db_projects to seo_url field. How can I add seo from db_projects not id (primary key) to seo_url field?
Posted 05 February 2013 - 08:56 AM
I don't think you can!
The whole GroceryCrud library is based on the unique ids of the tables so whenever a relation is created it uses the id to uniquely identify the equivalent record from the related table!
I don't know what you are trying to do but by using a model of yours you can quickly get the data you need based on this id from db_projects.