Mailinglisten-Archive |
Hallo,
>
> Folgendes habe ich probiert (SQL Anfaenger):
>
> $query =
> "SELECT
> linkcounter_links.id,
> linkcounter_links.url,
> linkcounter_links.title,
> linkcounter_count.MAX(calls) AS moritz
> FROM linkcounter_links LEFT JOIN linkcounter_count
> WHERE linkcounter_links.id = linkcounter_count.link
> ORDER BY linkcounter_links.id;";
> $myres = mysql_query($query,$db) or die ("Invalid Query.
> ".mysql_error()." (".mysql_errno().")");
>
> geht leider nicht. Als Fehlermeldung kommt: Invalid Query. You
> have an error in your SQL syntax near '(calls) AS moritz FROM
> linkcounter_links LEFT JOIN linkcounter_count WHERE lin' at line 5
> (1064)
>
Sollte doch "MAX(linkcounter_count.calls)" heißen, oder?
Gruß,
Leo
php::bar PHP Wiki - Listenarchive