Help Needed
Archived from the Xataface Developers forum.
sudhakar — Fri Mar 19, 2010 6:38 am
Dear Friends
I am a new to Xataface and I want to combine the two table and want to show in one view / edit / delete
Please tell me that one is possible or not in Xataface.
My table name “profile_categories” and “profile_categories_description” and my structure are shown below
- Code: Select all
- `` CREATE TABLE IF NOT EXISTS
profile_categories(
categories_idint(11) NOT NULL auto_increment,
categories_imagevarchar(64) default NULL,
parent_idint(11) NOT NULL default ‘0’,
sort_orderint(3) default NULL,
date_addeddatetime default NULL,
last_modifieddatetime default NULL,
PRIMARY KEY (categories_id),
KEYidx_categories_parent_id(parent_id)
)CREATE TABLE IF NOT EXISTS
profile_categories_description(
categories_idint(11) NOT NULL default ‘0’,
language_idint(11) NOT NULL default ‘1’,
categories_namevarchar(32) NOT NULL default ‘’,
PRIMARY KEY (categories_id,language_id),
KEYidx_categories_name(categories_name)
) ``
Thanks for your advanced help!.
shannah — Fri Mar 19, 2010 12:23 pm
Looks like you have a one-to-many relationship here between the profile_categories and profile_categories_description. The way that I would set this up, if you want it all on one form is to set up a relationship from profile_categories to profile_categories_description. Then use the grid widget to be able to add/remove languages to a profile_category on the profile_category edit form.
sudhakar — Sat Mar 20, 2010 9:08 am
Thanks for your reply. do you have any sample code for that one.