Advertisement
matthewpoer

Select the Products on a Given Quote [SugarCRM]

Mar 27th, 2013
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.51 KB | None | 0 0
  1. select quotes.name,products.name,products.quantity,products.cost_price,
  2. products.discount_price from quotes
  3. join product_bundle_quote on product_bundle_quote.quote_id = quotes.id
  4. join product_bundles on product_bundles.id = product_bundle_quote.bundle_id
  5. join product_bundle_product on product_bundle_product.bundle_id = product_bundles.id
  6. join products on products.id = product_bundle_product.product_id
  7. join products_cstm on products.id = products_cstm.id_c
  8. where quotes.id = '53bf915a-365f-b137-2304-510be4d8e764';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement