EllisLab text mark
Advanced Search
     
Relation CRUD
Posted: 03 October 2012 01:28 PM   [ Ignore ]
Joined: 2012-09-29
10 posts

Guys, I need your help, i can not create a relationship at CRUD. I want to keep SELECT list(HTML) of selected elements.
I have two tables:

Menu and Menu_title
They are linked by fields Menu.id_menu = Menu_title.id_menu

Have this code:

crud = new grocery_CRUD ();
crud-> set_table ('menu');


crud-> set_relation ('id_menu''menu_title''title');
crud-> display_as ('description''Summary');
crud-> set_relation ('id_menu''menu_title''title'); 


where

crud-> set_relation ('id_menu''menu_title''title'); 

Documentation connects two tables by field id_menu with output from the second table of the field title. It seems true.

Here’s an example in the documentation: http://www.grocerycr…/set_a_relation
I have that does not work, time delivery of the project there are 2 hours - the resolution is not found ((

 
Posted: 04 November 2012 03:02 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2012-11-04
1 posts

Your link was broken. http://www.grocerycrud.com/examples/set_a_relation