technically, you can't do this. some other people have suggested solutions
that will give you a close approximation of "the second row". the problem
(there is no fault with the suggestions or code) is that the concept of "the
second row" is not a constant. because of the way RDBMS systems work, there
is no way to *guarantee*, *every single time* that the "second row" will be
the "second row".
the data "lives" out in database land, and is returned in sets. just
because something is the second row one time you query for * from the DB,
there is no hard and fast guarantee that it will be the second row the next
time. this is especially true for SQL server and Oracle (IOW, the more
"powerful" DBMSs.)
chris olive, cio
cresco technologies
[EMAIL PROTECTED]
http://www.crescotech.com
-----Original Message-----
From: Roadrunner [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 19, 2001 9:48 PM
To: CF-Talk
Subject: newbie wants to access by rows and columns
Yes, Lee I want to access fields by rows and columns. Exactly. If it is more
advanced which you state it is, what topic would I look under in a Cold
Fusion book. I've abused everyone's talents enough for one evening. I'm
willing to go out and study this on my own. I just need direction.
Thanks,
Greg
-----Original Message-----
From: BORKMAN Lee [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 19, 2001 9:38 PM
To: CF-Talk
Subject: RE: Thanks everyone but one last question
Do you really want to see what's in row 2, column 2, or do you want to see
what ID(3)'s First Name is? That seems much more useful.
To do that you just use
<CFQUERY name=test>
SELECT FirstName from TableName
WHERE ID = 3
</CFQUERY>
#test.firstname#
If you really want to access fields by row and column number, there are a
number of ways, all of them slightly more advanced, but I doubt that's
actually what you want.
Let us know,
thanks Leeb.
-----Original Message-----
From: Roadrunner [mailto:[EMAIL PROTECTED]]
......
See the database setup below.
ID PASSWORD FIRSTNAME LASTNAME
4 sdf greg landry
3 gth tom jones
Lets say I wanted to see what is in the second record and see what's under
the column FIRSTNAME. What I am learning is that I have to print out the
entire database to see what is in it. I would just like to be able to know
how to access a particular element in a database. Like what's in row 2,
column 2?
IMPORTANT NOTICE:
This e-mail and any attachment to it is intended only to be read or used by
the named addressee. It is confidential and may contain legally privileged
information. No confidentiality or privilege is waived or lost by any
mistaken transmission to you. If you receive this e-mail in error, please
immediately delete it from your system and notify the sender. You must not
disclose, copy or use any part of this e-mail if you are not the intended
recipient. The RTA is not responsible for any unauthorised alterations to
this e-mail or attachment to it.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists