Jump to content

Recommended Posts

I'm in the process of recoding my cms and want to make catagories for content to be put under and would like a bit of help on how to create a linkup table.

I have got this so far for the main content

[code] mysql_query($strsql);
$strsql = "CREATE TABLE sim0ngportal_manuals_pages (id MEDIUMINT  UNSIGNED NOT NULL AUTO_INCREMENT,title VARCHAR(255), description MEDIUMTEXT , startpage CHAR(1), PRIMARY KEY (id));";[/code]

I will create a new table called "sim0ngportal_manuals_catagories" with just a field to insert catagory names, will probably be called "catagory_name" to keep things nice and simple.

Now, how do I then link the 2 together? do i need to create a forin key yo go to the other table? and how do I join it?  Have heard that I can use something like "INNER JOIN" but I'm not sure if thats correct or how exactly to use it.


Any help would be great
cheers :)
Link to comment
https://forums.phpfreaks.com/topic/20332-linkup-table/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.