Hallo. Ich habe schwierigkeiten bei folgendem Code:
Code:
SELECT 'date'
FROM tabelle
WHERE 'tld' = 'de'
AND IF( (
DATE_SUB( NOW( ) , INTERVAL 30
MINUTE ) > 'date' ) , (
UPDATE tabelle SET 'online' = '500',
'date' = NOW( )
),
NULL
) AND SELECT 'online'
Fehler:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UPDATE tabelle SET 'online' = '500', 'date' = NOW() ), NULL) AND SELECT ' at line 7
Ich hoffe jemand kann mir helfen.