Joining tables
Posted: Mon Apr 02, 2007 3:34 am
feyd | Please use
Above code works perfectly. How can i include one more table and and condition to the aboce query?
I tried,
its not working.
feyd | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
[syntax="sql"]SELECT product_sizes.*, product_details.* FROM product_sizes LEFT JOIN product_details ON product_sizes.sizeId=product_details.size AND product_details.productId=$productIdI tried,
Code: Select all
SELECT product_sizes.*, product_details.*, products.* FROM product_sizes LEFT JOIN product_details ON product_sizes.sizeId=product_details.size AND product_details.productId=$productId AND products.productId=product_details.productIdfeyd | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]