Ian,

On 10/10/2003 at 09:59, you wrote:

IV> Is it something to do with my CFIF statements?

IV> <CFQUERY datasource="liv8" name="funding">
IV> SELECT * FROM funding
IV> WHERE 1=1

IV> <cfif Len(Trim(form.orgname))>     AND UPPER(orgname) LIKE
IV> UPPER(<cfqueryparam cfsqltype="CF_SQL_VARCHAR"
IV> value="%#form.orgname#%">)

IV> <cfelseif Len(Trim(form.funding))>     AND UPPER(funding) LIKE
IV> UPPER(<cfqueryparam cfsqltype="CF_SQL_VARCHAR"
IV> value="%#form.funding#%">)

IV> <cfelseif Len(Trim(form.surname))>     AND UPPER(surname) LIKE
IV> UPPER(<cfqueryparam cfsqltype="CF_SQL_VARCHAR"
IV> value="%#form.surname#%">)

IV> <cfelseif IsNumeric(form.commyearfrom) AND
IV> IsNumeric(form.commmonthfrom) AND IsNumeric(form.commdayfrom) AND
IV> IsNumeric(form.commyearto) AND IsNumeric(form.commmonthto) AND
IV> IsNumeric(form.commdayto)>

   
IV>  AND IssueDate BETWEEN
IV>
IV> TO_DATE('#form.commyearfrom#-#form.commmonthfrom#-#form.commdayfrom#','YYYY-MM-DD')
IV> AND
IV>
IV> TO_DATE('#form.commyearto#-#form.commmonthto#-#form.commdayto#','YYYY-MM-DD')


IV> </cfif>
IV> </CFQUERY>

IV> As you can see the surname field parameter does not seem to have
IV> been parsed  ???

You are using CFELSEIFs, so only the first condition that is met gets
included. Change your code so that you have individual IF statements
for each filter.

~ Ubqtous ~

[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to