it wont, the are seperate actions in SQL - it looks like a job for an SP but
if you are using mySQL then your up shit creek.

-----Original Message-----
From: Tim Blair [mailto:[EMAIL PROTECTED]
Sent: 08 July 2003 13:56
To: [EMAIL PROTECTED]
Subject: RE: [ cf-dev ] OT: SQL counter


Got the bugger...

mysql> SET @rownum := 0;
Query OK, 0 rows affected (0.01 sec)

mysql> SELECT @rownum := @rownum + 1 AS rownum, uuid FROM pages LIMIT
10;
+--------+--------------------------------------+
| rownum | uuid                                 |
+--------+--------------------------------------+
|      1 | 03A2B655-D17C-400C-D114-EF3581F58B20 |
|      2 | 03A2FE5D-DA05-E892-2DC5-A98536395FB7 |
|      3 | 03CA9538-0327-784F-4F5B-3CE58A0CB78F |
|      4 | 03CACD46-E109-2C2F-8A74-8E4B6697098D |
|      5 | 03CB589F-9BB6-FC74-29AD-7532DF334EDC |
|      6 | 0484D5C4-9130-86FB-5F38-2AE13F43F8E7 |
|      7 | 0486809A-A416-C570-089F-BB53CD9322FE |
|      8 | 0487128C-CE25-EDA6-B559-7C82C3F633F4 |
|      9 | 04BC75F0-E548-A9EB-5038-903EEEDD5480 |
|     10 | 04BD8A00-F8D1-D5C7-FAF7-E00A5CC32B56 |
+--------+--------------------------------------+
10 rows in set (0.02 sec)

Now the only problem is it doesn't like having both the SET and SELECT
statements within the same <cfquery> tag...  :o\

Tim.

-------------------------------------------------------
RAWNET LTD - Internet, New Media and ebusiness Gurus.
Visit our new website at http://www.rawnet.com for
more information about our company, or call us free
anytime on 0800 294 24 24.
-------------------------------------------------------
Tim Blair
Web Application Engineer, Rawnet Limited
Direct Phone : +44 (0) 1344 393 441
Switchboard : +44 (0) 1344 393 040
-------------------------------------------------------
This message may contain information which is legally
privileged and/or confidential.  If you are not the
intended recipient, you are hereby notified that any
unauthorised disclosure, copying, distribution or use
of this information is strictly prohibited. Such
notification notwithstanding, any comments, opinions,
information or conclusions expressed in this message
are those of the originator, not of rawnet limited,
unless otherwise explicitly and independently indicated
by an authorised representative of rawnet limited.
-------------------------------------------------------




-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to