Actually it is
myquery["firstname"][2]
|-----Original Message-----
|From: Mike Nimer [mailto:[EMAIL PROTECTED]]
|Sent: Tuesday, March 20, 2001 1:29 PM
|To: CF-Talk
|Subject: RE: I guess i was unclear...try this..
|
|
|try this.
|myquery.firstname[2]
|or it's this
|myquery[2].firstname.
|
|Basically something to that effect. with cf queries you can
|access each row
|using array syntax, but you still need to access each column by name.
|
|HTH,
|---Mike
|
|-----Original Message-----
|From: Thomas Chiverton [mailto:[EMAIL PROTECTED]]
|Sent: Tuesday, March 20, 2001 4:38 AM
|To: CF-Talk
|Subject: RE: I guess i was unclear...try this..
|
|
|There is no such thing as a specific row, the order the
|records are returned
|to you (the rows) is random and undefined, it makes very
|little sense to ask
|'what is the value of 'firstname' in the 2nd row.
|
|If you really wanted to (for debugging I guess), you could
|<cfscript>
|lookfor=2;
|for(i=0;i<qQuery.recordcount;i=i+1){
| if (i eq lookfor){ <output row> }
|}
|
|-----Original Message-----
|From: Roadrunner [mailto:[EMAIL PROTECTED]]
|Sent: Tuesday, March 20, 2001 2:42 AM
|To: CF-Talk
|Subject: I guess i was unclear...try this..
|
|
|I guess I was unclear. Let's suppose I have no interest in a
|specific value
|like ID=3 but just want to know what is in a particular row
|and column. Am I
|always stuck using a where statement having to look for a
|particular value?
|I understand that a where statement can locate an instance of some
|particular. I would just like to do a search on a row and a column in
|general.
|
|greg
|
|
|
|-----Original Message-----
|From: Bryan Love [mailto:[EMAIL PROTECTED]]
|Sent: Monday, March 19, 2001 9:20 PM
|To: CF-Talk
|Subject: RE: Thanks everyone but one last question
|
|You can create whatever WHERE statement you wish to select
|whatever rows you
|need from the DB
|
|to get row 2, column 2:
|
|SELECT password
|FROM table
|WHERE ID = 3
|
|
|Bryan Love ACP
|Internet Application Developer
|[EMAIL PROTECTED]
|
|
|
|-----Original Message-----
|From: Roadrunner [mailto:[EMAIL PROTECTED]]
|Sent: Monday, March 19, 2001 6:02 PM
|To: CF-Talk
|Subject: Thanks everyone but one last question
|
|
|Thanks for the help on my newbie question. I learned a great
|deal believe it
|or not. You were all kind.
|
|Now one last question before I go back to the books.
|
|
|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?
|
|Thank you so much for your patience and time.
|
|Greg "the ever curious newbie"
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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