I used to have no problems using IF-statement in SQL-queries. Now nothing works, it always returns "Syntax error". This query also returns an error.
[CODE=mysql]IF (1=1) THEN
SELECT 'True'
ELSE
SELECT 'False'
END IF[/CODE]
What is wrong? I know it doesn't do anything, but why do I get syntax error?
[CODE=mysql]IF (1=1) THEN
SELECT 'True'
ELSE
SELECT 'False'
END IF[/CODE]
What is wrong? I know it doesn't do anything, but why do I get syntax error?
Comment