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

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

c++ - Serialize a class with a Qlist of custom classes as member (using QDataStream) -

Read video using VideoReader function in Matlab? -