php - sub query needed I think -


i asked question yesterday , reposting simple version of make sure there no confusion attempting.

adam    toyota joe     toyota rick    mazda  select * table     name adam   , return rows name not adam have same car adam. 

so search adam return rows: adam & joe.

select * `table` `name` = 'adam' or car in (     select car `table` `name` = 'adam' ) 

the "name not adam but" part not making sense, since adams anyway.


Comments

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

php array slice every 2th rule -