Martín Marqués wrote:
El Dom 01 Feb 2004 12:54, John W. Holmes escribió:
Shaun wrote:
Is it possible to have an incrementing row count in my query that is not
part of the table data?

If you _have_ to get this in your query I'd say you have a flaw in your logic somewhere. However, you can do it in MySQL using these two queries.

SELECT @a:=0;


This isn't very good SQL coding.

Sure it is. It's the question that's not very good.

If you use a database with sequences, built a temptable to put the data in temporarly, with an INT field at the begining, and a sequence to have the autoincremental.

Very easy, and compatile with any relational DB. :-)

Exactly. That's why I gave a solution for MySQL.

---John Holmes...

Amazon Wishlist:

php|architect: The Magazine for PHP Professionals –

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to