You can't do it that way, at least with cf5.

You have to use a combo of QueryAddRow() and QuerySetCell() to add new
rows and their values to an existing query object.

<cfset QueryAddRow(MyQuery ,1) >

<cfset QuerySetCell(MyQuery, "firstname","SomeFirstName", 2)>
<cfset QuerySetCell(MyQuery, "lastname","SomeLastName", 2)>

<cfdump var="#myQuery#">

Nick Han

>>> [EMAIL PROTECTED] 07/13/04 09:54AM >>>
I have a query that I wish to add to in the second position. Say if I
wanted
to add a second element to the object "MyQuery". How would that be
done?

<cfquery name="MyQuery">
   select fristname, lastname from tbl_names
</cfquery>

Now if I wanted to add another item to the 2nd position of that query
how
would this be accomplished?

here's my code. I'm not sure it's working.

<cfset MyQuery["firstname"][2] = "SomeFirstname">
<cfset MyQuery["lastname"][2] = "SomeLastname">
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to