close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

setup products table mysql database

Thread began 1/15/2010 12:33 pm by mr hankey | Last modified 1/25/2010 7:34 pm by mr hankey | 1069 views | 9 replies

Eric Mittman

Ok, it looks like you have a users, products, and clients table. You have user relating to clients through a foreign key and the same for products. The thing that this structure does not account for is if the client has multiple products. This structure would be fine for holding a single product, but how would you record the details if the client had multiple products?

I think you could account for this if you had another column in the products table, if you added a client_product id column to this table you could use this as a foreign key to relate to the client directly. The products table would then have an entry for each product the client owned, it would contain the product id, the name of the product and the id of the client.

You could also leave the current structure in place and creating a lookup table for client_products. This table would have three columns, an auto incrementing id column for the primary key, a column for the client id, and a column for the product id.

I think if you add in this extra column or this lookup table you would be able to account for the multiple products per client.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...