Re: Row count in a query
| From: | Ignatius Reilly | Date: | Sat, 31 Jan 2004 11:02:22 +0000 |
| Subject: | Re: Row count in a query | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-32734@lists.php.net to get a copy of this message | ||
The best way I can think of is:
- create a temporary table T with an autoincrement field + desired output
column structure
- perform a INSERT INTO T SELECT 0, <desired output> in the temp table
- you now have the desired result in your temp table
HTH
Ignatius
_________________________
----- Original Message -----
From: "Shaun" <shaun@mania.plus.com>
To: <php-db@lists.php.net>
Sent: Saturday, January 31, 2004 11:44
Subject: [PHP-DB] Row count in a query
> Hi,
>
> Is it possible to have an incrementing row count in my query that is not
> part of the table data?
>
> i.e.
>
> 1 data data
> 2 data data
> 3 data data
> ...
>
> This has to be done in the query not the PHP!!
>
> Thanks for your help
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>