PHP mySQL fetch data if no match in second table -
the following code supposed return results either match parameter in table or don't match id @ all.
this attempt , don't understand why not work. returns many times number of results.
select * table2, table1 table1.id = table2.name , table1.value = 1 or table1.id != table2.name
how can fixed
looks need parenthesis
from table2, table1 (table1.id = table2.name , table1.value = 1) or table1.id != table2.name table2, table1 table1.id = table2.name , (table1.value = 1 or table1.id != table2.name)
Comments
Post a Comment