I would like to run an update query my refind on the serialnumber returns
all positive matches. Right now, it will return what is in the first part
of the if and what is in the else part. The whole thing looks like this:

<cfloop from="1" to="#ListLen(form.modelnumber)#" index="i">
<cfquery name="getexpression" datasource="">
select * from modelsdetails where name = '#ListGetAt(form.modelnumber,i)#'
</cfquery>
<cfif refind("#getexpression.regexpression#",
#ListGetAt(form.SerialNumber, i)#)>
run query if all return correct!

<cfelse>

<cfquery name="getpromomodels" datasource="theview">
select * from prmodels where promotionid = '#form.promo#'
</cfquery>

Your serial number for model <cfoutput>#ListGetAt(form.modelnumber,i)# is
incorrect. Please re-enter the serial number.</cfoutput>
Model Number  Serial Number

<Select name="ModelNumber"><Option
id="<cfoutput>#ListGetAt(form.modelnumber,i)#</cfoutput>"
value="<cfoutput>#ListGetAt(form.modelnumber,i)#</cfoutput>"><cfoutput>#ListGetAt(form.modelnumber,i)#</cfoutput></option>
<cfloop query="getpromomodels">
<option id="<cfoutput>#getpromomodels.modelid#</cfoutput>"
value="<cfoutput>#getpromomodels.modname#</cfoutput>"><cfoutput>#getpromomodels.modname#</cfoutput></option>
</cfloop>
</select>
input type="text" name="serialnumber>
</cfif>
</cfloop>
<INPUT type="submit" value="Continue" id="renter" name="renter"></form>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to