|
Greg
Thats
a pretty big query there, especially is there searchItems are
empty.
Maybe try something like
this
<cfquery name="Search" datasource="toolshed" username=""
password="">
SELECT USERID,BILL_FNAME,BILL_LNAME,BILL_COMPANY,BILL_ADDRESS,BILL_CITY, BILL_STATE,BILL_ZIP,BILL_PHONE,BILL_FAX,BILL_COUNTRY,BILL_EMAIL FROM MEMBERS <cfif Lookup is "Y" AND Len(Trim(searchterms))> WHERE USERID LIKE '%#searchterms#%' or BILL_FNAME LIKE '%#searchterms#%' or BILL_LNAME LIKE '%#searchterms#%' or BILL_COMPANY LIKE '%#searchterms#%' or BILL_ADDRESS LIKE '%#searchterms#%' or BILL_CITY LIKE '%#searchterms#%' or BILL_STATE LIKE '%#searchterms#%' or BILL_ZIP LIKE '%#searchterms#%' or BILL_PHONE LIKE '%#searchterms#%' or BILL_FAX LIKE '%#searchterms#%' or BILL_COUNTRY LIKE '%#searchterms#%' or BILL_EMAIL LIKE '%#searchterms#%' </cfif> ORDER BY BILL_LNAME, BILL_FNAME </cfquery> I
would also be a little weary about using so may OR s in your query. Lost
of load on that
Regards Steve Onnis
("If you think it can't be done, you haven't asked me!") - Steve Onnis
--- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] MX Downunder AsiaPac DevCon - http://mxdu.com/ |
- [cfaussie] Re: Error Occurred While Processing Request gary menzel
- [cfaussie] RE: Error Occurred While Processing Reques... Mark Stanton
- [cfaussie] RE: Error Occurred While Processing Reques... Steve Onnis
- [cfaussie] RE: Error Occurred While Processing Reques... Daniel Morphett
- [cfaussie] RE: Error Occurred While Processing Reques... gary menzel
- [cfaussie] RE: Error Occurred While Processing Reques... Rob McLennan
- [cfaussie] RE: Error Occurred While Processing Reques... Toby Tremayne
- [cfaussie] RE: Error Occurred While Processing Reques... Steve Onnis
- [cfaussie] RE: Error Occurred While Processing Reques... gary menzel
