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

Glib GIOChannel -

jsp - java.sql.SQLException: [Microsoft][ODBC Microsoft Access > Driver] Too few parameters. Expected 1 -

python - Obscure curses error message when creating a sub window -