Hi all,
I am building a simple CMS system where each user can manage his own sections and each section has its own articles.
only the section owner can add articles in his sections.
as such i have the following tables:
users
-----------
user_id (primary - autoincrement)
username
password
sections
------------
section_id (primary - autoincrement)
user_id (foreign key)
section_title
section description
articles
---------
article_id (primary - autoincrement)
section_id (foreign key)
article_title
article_body
- how can i make this work in phprunner without adding a user_id column on the articles table (as this is inherited by the sections table and is redundant information)
- When selecting a section via a select box how can i enforce that the users only select on of their own sections and not the sections of other users?
thanks in advance