Values from 3 tables

Results 1 to 2 of 2

Thread: Values from 3 tables

  1. #1
    Join Date
    Dec 1969

    Default Values from 3 tables

    I have a database with 3 tables the structure is like this:<BR><BR>Tables:<BR>Shop<BR>Product<BR>ShopPro duct<BR><BR>Shop Table: (columns)<BR>ShopName (relation to shopname in table ShopProduct)<BR>URL<BR>ShopInfo<BR><BR>Product Table: (columns)<BR>Category<BR>Brand<BR>Product (relation to product in table product)<BR>Picture<BR>RRP<BR><BR>ShopProduct TAble: (columns)<BR>RefNo <BR>ShopName (relation to ShopName in table Shop)<BR>Product (relation to Product in table Product)<BR>Price<BR>URLcustom<BR><BR><BR>How can I call this information when product = product selected.<BR><BR>For each product there are 6 prices and stores that sell that item.<BR>

  2. #2
    Join Date
    Dec 1969

    Default Just select them...

    Select product.*, shopProduct.*, shop.* from product, shopProduct, shop where (product.product = 1) and (shopproduct.product = product.product) and (shopproduct.shopname = shop.shopname)<BR><BR>You will have to modify the SQL statement so that is selects the correct product, but if the product number is 1, it will find all products that have a product of 1 and the corrisponding shop product and shop...<BR><BR>-- Whol

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts