using multiple LIKE in mysql on multiple JOIN -
i wondering if syntax of mysql query: joining multiple tables search term (like %%). works fine:
select * table1 join table2 table1.town=table2.town , table1.car=table2.car , `name` "%search-term%"
until add 'like':
or `car` "%search-term%"
which appends 'car' results in table1. , or works me when using 1 table confuses when on 2 or more joined tables.. appreciated
try this:
edit:
select * table1 join table2 table1.town=table2.town , table1.car=table2.car , ( table1.name "%search-term%" or table2.car "%search-term%" ) order table1.name
Comments
Post a Comment