Created
December 30, 2015 19:57
-
-
Save half2me/eca68fe9535dc0238ac0 to your computer and use it in GitHub Desktop.
$query in SQL code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
Products.id AS `Products__id` | |
FROM | |
products Products | |
INNER JOIN websites Websites ON Websites.id = 1 | |
INNER JOIN products_websites ProductsWebsites ON ( | |
Products.id = (ProductsWebsites.product_id) | |
AND Websites.id = (ProductsWebsites.website_id) | |
) | |
INNER JOIN product_info ProductInfo ON ( | |
ProductInfo.sku = '307793-002' | |
AND ProductInfo.id = (Products.product_info_id) | |
) | |
WHERE | |
( | |
(reservation_id) IS NULL | |
AND size = '4.5Y' | |
) | |
LIMIT | |
3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment