Isn't this complicating things a lot???
Instead of one loop, you will do two loops and a QofQ: why??

Also, get rid of evaluate and use array notation instead.

Pascal

> -----Original Message-----
> From: vishnu prasad [mailto:[EMAIL PROTECTED]
> Sent: 20 September 2004 14:33
> To: CF-Talk
> Subject: [Spam?] Re: urgent:Coldfusion Looping
>
> Hi
> did in the other way
> <cfset emailList = ArrayNew(1)>
> <cfset MailQuery = QueryNew("Name,age,mark")>
>
> <!--- made this more flexible just enter the max number of entries
--->
> <cfset maxNumber = 4>
> <cfset counter = 1>
> <cfloop index="i" from="1" to="#maxNumber#" step="1">
> <cfset temp = QueryAddRow(MailQuery)>
> <cfset temp =
> QuerySetCell(MailQuery,"Name",Evaluate("FORM.name#i#"),#counter#)>
> <cfset temp = QuerySetCell(MailQuery,"age",
> Evaluate("FORM.age#i#"),#counter#)>
> <cfset temp =
> QuerySetCell(MailQuery,"mark",Evaluate("FORM.marks#i#"),#counter#)>
> <cfset counter = counter + 1>
> </cfloop>
>
> <cfdump var="#MailQuery#">
> <cfquery name="test" dbtype="query">
> select * from MailQuery where name <> '' and age <> '' and mark <> ''
> </cfquery>
> <cfdump var="#test#">
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to