Sabine: 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 ?

MySQL Version 4.0.20-standard

http://dev.mysql.com/doc/mysql/en/control-flow-functions.html hilft auch nicht

Sabine