View Single Post
Old 05-08-2008, 09:17 PM   #4 (permalink)
Jim
The Addict
 
Jim's Avatar
 
Join Date: Nov 2007
Location: the Netherlands
Posts: 281
Thanks: 2
Jim is on a distinguished road
Default

I tried google for a second but didn't found a tutorial that fast.

What Wildhoney means with the ID is a sort of linking. A way to link a company to a category by giving the category an ID.

Let's say you have 5 categories in table 'categories':

Title: Internet
ID: 1

Title: Cars
ID: 2

Title: Hardware
ID: 3

Title: Bikes
ID: 4

Title: Software
ID 5

Each category has it's unique ID.

Now lets say we would like to add some companies to table "company".

Title: Adobe
Category-ID: 5

Title: Yamaha
Category-ID: 4

Title: Ducati
Category-ID: 4

Title: Google
Category-ID: 1

Title: Asus
Category-ID: 3

You now linked all companies to a category. So now when you want to list all companies from the category "bikes". You need to query the database for all companies where the Category-ID is 4.

I highly recommend you to search for a good tutorial for this (with more database tips). Because in the end the database layout is one of the most important things of a big and good working system! :)
__________________
Nunchaku! Who doesn't like martial arts? =)
Send a message via MSN to Jim Send a message via Skype™ to Jim
Jim is offline  
Reply With Quote