Skip to content

Instantly share code, notes, and snippets.

@webhasan
Last active August 29, 2015 14:05
Show Gist options
  • Save webhasan/7527f34227374c605b6f to your computer and use it in GitHub Desktop.
Save webhasan/7527f34227374c605b6f to your computer and use it in GitHub Desktop.
Query for multipul table joining
$query = sprintf("SELECT *
FROM `product`
WHERE `id`
IN ( SELECT `product_id` FROM `customar_product` WHERE `user_id`='%d' )", $_GET['id']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment