phpbar.de logo

Mailinglisten-Archive

[php] mysql-Abfrage alles in einer query?

[php] mysql-Abfrage alles in einer query?

Lutz Horn php_(at)_phpcenter.de
Fri, 1 Mar 2002 12:46:05 +0100


Hallo "j",

* j [Fri, Mar 01, 2002 at 12:32:43PM +0100]:
> select * from protokolle where protokoll_id = max(protokoll_id)

Das geht so nicht.

mysql> create table t1 (f1 int);
Query OK, 0 rows affected (0.13 sec)

mysql> insert into t1 values(1);

[...]

mysql> select * from t1 where f1 = max(f1);
ERROR 1111: Invalid use of group function

Gruß, Lutz


php::bar PHP Wiki   -   Listenarchive