"Tonny Jørgensen" <hest@aub.dk> wrote in message
news:asvkht$181k$1@news.cybercity.dk...
> mysql_query("select username from users where lastaction = 'chat' HAVING
> (unix_timestamp(now())-unix_timestamp(lastaction)) < 300")
>
> giver følgende fejl:
>
> Unknown column 'lastaction' in 'having clause'
>
> men kun i having clause ? den virker fint i where clause ? hvad gør jeg
> forkert ?
>
er nu kommet lidt videre men !!
mysql> select username, now() as nutid, timestamp as tid,
(unix_timestamp(now())-unix_timestamp('tid')) as delta from users;
+----------------------+---------------------+---------------------+--------
----+
| username | nutid | tid | delta
|
+----------------------+---------------------+---------------------+--------
----+
| hest | 2002-12-08 15:39:15 | 2002-12-08 14:56:39 |
1039358355 |
| Rina | 2002-12-08 15:39:15 | 2002-11-21 21:42:39 |
1039358355 |
| Grønner | 2002-12-08 15:39:15 | 2002-12-08 15:34:16 |
1039358355 |
| Burgher | 2002-12-08 15:39:15 | 2002-11-04 17:01:15 |
1039358355 |
| MethanGas | 2002-12-08 15:39:15 | 2002-12-08 15:24:11 |
1039358355 |
| JunkStarLittle | 2002-12-08 15:39:15 | 2002-10-27 11:44:39 |
1039358355 |
| Hest(e) | 2002-12-08 15:39:15 | 2002-10-27 12:56:18 |
1039358355 |
| 456456456 | 2002-12-08 15:39:15 | 0000-00-00 00:00:00 |
1039358355 |
| mester | 2002-12-08 15:39:15 | 2002-10-27 16:57:23 |
1039358355 |
| Eeva | 2002-12-08 15:39:15 | 2002-12-06 01:46:35 |
1039358355 |
| bwulf | 2002-12-08 15:39:15 | 2002-10-06 00:15:28 |
1039358355 |
som i kan se er delta ens for alle users ?? hvorfor det? skulle den ikke
vise delta hvor hver enkelt user ? det er ihvertfalde det jeg skal bruge
- tonny,
www.jegergud.dk