View Single Post
  #5 (permalink)  
Old May 25th, 2006, 06:16 PM
Beebs Beebs is offline
Authorized User
 
Join Date: May 2006
Location: , , Australia.
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Beebs
Default

There's no choice to edit the post so I have to add my post here.

If you are asking about the categorical/hierarchial code, well that's surely my question so I can't come up with the code.

But enough with rants. If you like to help or comments me here's the SQL that I did.
Code:
CREATE TABLE IF NOT EXISTS cms_section (
  section_id int(4) unsigned NOT NULL auto_increment COMMENT 'The unique ID of the section',  
  is_published tinyint(1) NOT NULL default '0',
  section_name varchar(20) NULL COMMENT 'The section name',
  section_parent_id int(4) NULL DEFAULT 0 COMMENT 'The ID of the parent section',  
  author_id int(11) NOT NULL default '0',
  PRIMARY KEY (section_id)
)TYPE=MyISAM;

CREATE TABLE IF NOT EXISTS cms_articles (
  article_id int(11) NOT NULL auto_increment,  
  section_id int(4) unsigned NOT NULL default '0' COMMENT 'Relation to section',
  author_id int(11) NOT NULL default '0',
  is_published tinyint(1) NOT NULL default '0',
  date_submitted datetime NOT NULL default '0000-00-00 00:00:00',
  date_published datetime NOT NULL default '0000-00-00 00:00:00',
  title varchar(255) NOT NULL default '',
  body mediumtext NOT NULL,
  PRIMARY KEY (article_id),
  KEY IdxArticle (author_id,date_submitted),
  FULLTEXT KEY IdxText (title,body)
)
  TYPE = MyISAM
Please look at relational field : section_id int(4) unsigned NOT NULL default '0' COMMENT 'Relation to section', between those to table.

Question : Am I in the right track?

Reply With Quote