Jump to content

linkup table


sim0ng

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.