Coding help

HELP! HELP!

I have created a mysql database which contains the following tables: “stories” and “comments.” The “stories” table has 5 columns among them the “title” and “story” columns. There is a page on my website that has a form whose data is inserted into “stories” table.

I want to achieve the following tasks:

  1. I want the sidebar to show the titles of 5 latest stories in hyperlink form. When a member clicks the hyperlink on the sidebar, a page loads showing the story and the author and date it was posted plus all its associated comments. At the bottom is a form which allows another comment to be inserted.

The problems I am having are:

  1. Establishing a relationship between the “stories” and “comments” tables such that each story is linked to its comments.
  2. Creating a sidebar showing the titles of five latest stories in hyperlink form.
  3. Loading a story and its associated comments.
  4. Allowing a member to insert comment.

ANY HELP WILL BE HIGHLY APPRECIATED. THANKS IN ADVANCE.

Sponsor our Newsletter | Privacy Policy | Terms of Service