Help Needed

A place to discuss development of the Xataface core.

Help Needed

Postby 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_id` int(11) NOT NULL auto_increment,
  `categories_image` varchar(64) default NULL,
  `parent_id` int(11) NOT NULL default '0',
  `sort_order` int(3) default NULL,
  `date_added` datetime default NULL,
  `last_modified` datetime default NULL,
  PRIMARY KEY  (`categories_id`),
  KEY `idx_categories_parent_id` (`parent_id`)
)

CREATE TABLE IF NOT EXISTS `profile_categories_description` (
  `categories_id` int(11) NOT NULL default '0',
  `language_id` int(11) NOT NULL default '1',
  `categories_name` varchar(32) NOT NULL default '',
  PRIMARY KEY  (`categories_id`,`language_id`),
  KEY `idx_categories_name` (`categories_name`)
)


Thanks for your advanced help!.
sudhakar
 
Posts: 2
Joined: Fri Mar 19, 2010 6:30 am

Re: Help Needed

Postby 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.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Help Needed

Postby sudhakar » Sat Mar 20, 2010 9:08 am

Thanks for your reply. do you have any sample code for that one.
sudhakar
 
Posts: 2
Joined: Fri Mar 19, 2010 6:30 am


Return to Xataface Developers

Who is online

Users browsing this forum: No registered users and 19 guests

Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved