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

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -