Skip to content

Instantly share code, notes, and snippets.

@JohnMurray
Created July 5, 2012 11:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JohnMurray/3053282 to your computer and use it in GitHub Desktop.
Save JohnMurray/3053282 to your computer and use it in GitHub Desktop.
Link Multi-Where
select *
from (
select *
from carModels as t1,
carMakes as t2
where t1.somePKId = t2.someFKId
and (
t1.Name like '%c%'
or t2.Name like '%c%'
)
limit 0, 25
)
where t1.Name like '%honda%'
or t2.Name like '%honda%'
limit 0, 25;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment