Phil Z.: MySQL Query - Finde den Fehler - ich verzweifel

Beitrag lesen

Hi.

Den Fehler mit dem Tabellen Namen, hab ich behoben aber nun:

$sql="SELECT artikel, title, DATE_FORMAT(datum,'%W %d.%M %Y') AS date1, author,num FROM news ORDER BY news.datum DESC LIMIT ".$artikel_anz_start.", $artikel_anz_end";

echo $sql:
SELECT artikel, title, DATE_FORMAT(datum,'%W %d.%M %Y') AS date1, author,num FROM news ORDER BY news.datum DESC LIMIT 0, 10

echo urlencode($sql):
SELECT+artikel%2C+title%2C+DATE_FORMAT%28datum%2C%27%25W+%25d.%25M+%25Y%27%29+AS+date1%2C+author%2Cnum+FROM+news+ORDER+BY+news.datum+DESC+LIMIT+0%2C+10

Fehler:
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 '' at line 1

mfg

Phil Z.