Luca,

> the result was: ",1,2,.....,n".
> but today doesn't works anymore
> now the result is ".n" where n is the last max(id) value in the result
set.

I did a similar query on this table;

mysql> DESCRIBE gehalt;
+-------+----------------------+------+-----+---------+-------+
| Field | Type                 | Null | Key | Default | Extra |
+-------+----------------------+------+-----+---------+-------+
| id    | smallint(5) unsigned |      |     | 0       |       |
| hoehe | int(11)              | YES  |     | NULL    |       |
+-------+----------------------+------+-----+---------+-------+

And I get this, with MySQL 4.0.7:

mysql> SELECT @ID := CONCAT(@ID,',',MAX(id)) FROM gehalt GROUP BY hoehe;
+--------------------------------+
| @ID := CONCAT(@ID,',',MAX(id)) |
+--------------------------------+
| ,3,1                           |
| ,3,2                           |
| ,3,3                           |
+--------------------------------+

Isn't that what it's supposed to be?

Is it maybe something simple & stupid like different data in your table?

Regards,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  Geschäftsführer / CEO iConnect GmbH <http://iConnect.de>
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

----- Original Message -----
From: "Luca Burlizzi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, January 04, 2003 5:35 PM
Subject: is it a bug?


> hello,
>
> I have a problem in mysql 4.0.7
>
> this piece of code worked until version 4.0.4
> SELECT @ID:='';
> SELECT @ID:=CONCAT(@ID,',',MAX(ID)) FROM WF_Users GROUP BY GUID;
> SELECT @ID;
>
> the result was: ",1,2,.....,n".
>
> but today doesn't works anymore
> now the result is ".n" where n is the last max(id) value in the result
set.
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to