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 -

delphi - When I encode/decode SMS PDU (GSM 7 Bit) user data, do I need prepend the UDH first? -

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