Jump to content

Archived

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

Guest yoruldum

Newbie : Array Field

Recommended Posts

Guest yoruldum

Hi there,

I have a problem as you can imagine :)

 

There is a table which has a list of products.For example we are buying product A from 3 suppliers and product B from 5 suppliers which of 2 suppliers are same. I want to have ability to search this table like \"SELECT * FROM products WHERE product_name = \'A\'\" and fetch suppliers name from that dataset. If I create one field called suppliers and add values like \"supp1,supp2,supp3\" than the result will be one string and I have to parse these one by one.

 

Is there any easier way for that freaks :lol:

Share this post


Link to post
Share on other sites

You should probably create another table that just keeps track of which suppliers stock which products. Since you have a \"many-to-many\" relationship it should not be stored with your products.

Share this post


Link to post
Share on other sites

×

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.