Skip to content

Instantly share code, notes, and snippets.

@dardub
Created June 6, 2012 20:49
Show Gist options
  • Save dardub/2884675 to your computer and use it in GitHub Desktop.
Save dardub/2884675 to your computer and use it in GitHub Desktop.
$manufacturers = Shop_Manufacturer::create();
$manufacturers->where('exists (select * from shop_manufacturers, shop_products
where shop_products.manufacturer_id = shop_manufacturers.id
and shop_products.id = 3984)');
/* returns MySQL error executing query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select * from shop_manufacturers, shop_products
where shop_prod' at line 6
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment