Write in the relation table
- Single Page
Posted 25 January 2012 - 12:59 PM
Having the attached situation, when writing in categories, how can I write the names in categories_t table for every language code in languages table.
http://imgur.com/tu5AV
Thanks for the time
Posted 25 January 2012 - 19:04 PM
In your case it will be:
$crud->set_table('categories_t');
$crud->set_relation('language_id','languages','code');
$crud->set_relation('category_id','categories','picture');
Posted 26 January 2012 - 10:48 AM
So the entry form would be like this:
[indent=1]Enter new category (category_id has the auto_increment option):[/indent]
[indent=1]Name: name_in_english (languages->name) [code (languages->code)] - en[/indent]
[indent=1]Name: name_in_albanian (languages->name) [code (languages->code)] -sq[/indent]
[indent=1]Picture: url_to_the_picture[/indent]
[indent=1]After this I would have new categories row, and two new categories_t rows.[/indent]
Thank you,
Adam
Posted 03 April 2012 - 22:01 PM
Sorry for the misunderstanding. I like to write in categories.
So the entry form would be like this:
[indent=1]Enter new category (category_id has the auto_increment option):[/indent]
[indent=1]Name: name_in_english (languages->name) [code (languages->code)] - en[/indent]
[indent=1]Name: name_in_albanian (languages->name) [code (languages->code)] -sq[/indent]
[indent=1]Picture: url_to_the_picture[/indent]
[indent=1]After this I would have new categories row, and two new categories_t rows.[/indent]
Thank you,
Adam
[/quote]
I have the same problem,
Posted 04 April 2012 - 06:32 AM