|  | Posted by no.mail.pls on 06/14/57 11:42 
Hiya,
 How do i retreive fields with similar values from 2 tables?
 
 I tried to use
 (1) "SELECT * FROM $table1 as o , $table2 as p WHERE o.name like
 '%p.name%'";
 but it retrieves nothing at all.
 
 (2) "SELECT * FROM $table1 as o , $table2 as p WHERE o.name like p.name";
 will retrieve exact matches only, but this is not what i want.
 
 (3) SELECT * FROM $table1 as o , $table2 as p WHERE o.name LIKE CONCAT('%',
 p.name, '%');
 will retrieve exact matches only.
 
 Any advice will be appreciated.
 
 PostScript: i posted the above in mysql groups, but problem remains, so am
 trying my luck here.
 
 TIA
  Navigation: [Reply to this message] |