Karl-Heinz: MySQL IF

Beitrag lesen

Hallo

SELECT * test_tabelle
OK

SELECT * FROM test_tabelle WHERE test_spalte = 'test1'
OK

SELECT * FROM test_tabelle WHERE test_spalte = 'test1' OR test_spalte = 'test2'
OK

SELECT * FROM test_tabelle WHERE IF(test_spalte = 'test1', 'test_spalte = 'test2'')
Nicht OK

Warum ?

Versuchs mal mit SELECT * FROM test_tabelle WHERE test_spalte = 'test1' AND 'test_spalte = 'test2'