How are you sending the variables to CF? via LoadVariables()
if so you could pass in an extra field that states how many fields
you have created and then use that as the number of loops for CF to
perform.

You could also potentially use Flash Remoting (if flash version is not
an issue and you are you MX+) and build up and object to pass to CF
which then treats it as a structure

HTH

Mike

----- Original Message -----
From: Frank Dewey <[EMAIL PROTECTED]>
Date: Mon, 5 Jul 2004 09:03:07 -0500
Subject: variables with <cfquery>
To: CF-Talk <[EMAIL PROTECTED]>

hello all,



I am sending a file from flash to CF.  The variables are getting

there...so that is no problem.  However, once they get there, then I am

not sure how to put them into action.  For example, I am sending many x

and y values, and some IDs.  So a basic query for sending flash

variables to CF looks like this:



assume I am sending these values from Flash to CF -

xValue;

yValue;

myID;



CFpage -

<cfquery ...>

UPDATE    tableName

SET           x = #form.xValue#,

                 y =  #form.yValue#

WHERE    ID = #form.myID#

</cfquery>

The problem is that I am sending several values and I don't know how

many until run-time.  I also have to create the variables and there

values at run-time...so this is what I have:



assume I am sending these values from Flash to CF -

x1 = 10;

y1 = 50;

myID1 = 1045;

x2 = 10;

y2 = 50;

myID = 2;

...



CFpage -

<cfloop from="1" to="#form.numberOfValues#" index="i">

    <cfset thisX = form.x#i#>

    <cfset thisY = form.y#i#>

    <cfset thisID = form.myID#i#>

    <cfquery ...>

        UPDATE    tableName

        SET           x = #thisX#,

                         y =  #thisY#

        WHERE    ID = #thisID#

    </cfquery>

</cfloop>



So I am asking how to create a dynamic variable...involving

concatenation?   Any help with this problem is greatly appreciated -

  Frank

-----------------------------------------------------------

The Preceeding Email Has Been Scanned

and Verified By QBOS Security Systems

-----------------------------------------------------------

QBOS, Inc.

14275 Midway Rd.  Suite 220

Addison, TX 75001

972.233.5066________________________________
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to