Meine Abfrage lautet:
MySQL meldet hier:
Bei mir auf dem lokalen Rechner funktioniert es.
Was ist hieran ($topical_year - substr(birthdate,7,4)) < '18' falsch??
PHP-Code:
$s = mysql_query("SELECT COUNT(id) AS num FROM users
WHERE ($topical_year - substr(birthdate,7,4)) < '18' AND
birthdate != '' ORDER BY id") or die (mysql_error());
PHP-Code:
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 '(birthdate,7,4)) < '18' AND
birthdate != '' ORDER BY id' at lin
Was ist hieran ($topical_year - substr(birthdate,7,4)) < '18' falsch??
Kommentar