RE: search results produce everything in the table...
sorry I didn't make myself clear. When the user types in nothing I want them to get nothing. -Original Message- From: Olive, Christopher M Mr USACHPPM [mailto:[EMAIL PROTECTED]] Sent: 11 April 2000 18:38 To: '[EMAIL PROTECTED]' Subject: RE: search results produce everything in the table... well, that's what you designed it to do. what do you want your default no criteria selected results to be? Chris Olive DOHRS Website Administrator [EMAIL PROTECTED] -Original Message- From: Richard Hart [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 11, 2000 12:23 PM To: House of Fusion Subject: search results produce everything in the table... Hi, I have a simple search form on which you can search on three criteria. However when I type nothing in the form and hit submit it gives me everything in the table. I have tried to over-ride this to no effect. Can anyone point me in the right direction? Thanks, Richard .. In the results page I have something like: CFQUERY NAME="blahblah" DATASOURCE="blahblah" blahblah CFIF Trim(VariableOne) IS NOT "" AND FieldOne LIKE '%#Trim(Form.VariableOne)#%' /CFIF CFIF Trim(VariableTwo) IS NOT "" AND FieldTwo LIKE '%#Trim(Form.VariableTwo)#%' /CFIF CFIF Trim(VariableThree) IS NOT "" AND FieldThree LIKE '%#Trim(Form.VariableThree)#%' /CFIF balhblah /CFQUERY -- -- -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf _talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: search results produce everything in the table...
if nothing is typed in I want no results to be returned or at least no results shown. -Original Message- From: Jeff Shepler [mailto:[EMAIL PROTECTED]] Sent: 11 April 2000 19:14 To: '[EMAIL PROTECTED]' Subject: RE: search results produce everything in the table... Since the search is only restricted to what you type in, if you leave it blank the search is not restricted. Hence the entire table is returned. What would you like to have happen instead? -Original Message- From: Richard Hart [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 11, 2000 12:23 PM To: House of Fusion Subject: search results produce everything in the table... Hi, I have a simple search form on which you can search on three criteria. However when I type nothing in the form and hit submit it gives me everything in the table. I have tried to over-ride this to no effect. Can anyone point me in the right direction? Thanks, Richard .. In the results page I have something like: CFQUERY NAME="blahblah" DATASOURCE="blahblah" blahblah CFIF Trim(VariableOne) IS NOT "" AND FieldOne LIKE '%#Trim(Form.VariableOne)#%' /CFIF CFIF Trim(VariableTwo) IS NOT "" AND FieldTwo LIKE '%#Trim(Form.VariableTwo)#%' /CFIF CFIF Trim(VariableThree) IS NOT "" AND FieldThree LIKE '%#Trim(Form.VariableThree)#%' /CFIF balhblah /CFQUERY -- -- -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf _talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: search results produce everything in the table...
Write a check for a form field to have a value greater then null and then put your query and output in side that if statement. if form.field gt '' do query if not form.field gt '' do whatever end if Bill -Original Message- From: Richard Hart [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 13, 2000 10:36 AM To: [EMAIL PROTECTED] Subject: RE: search results produce everything in the table... sorry I didn't make myself clear. When the user types in nothing I want them to get nothing. -Original Message- From: Olive, Christopher M Mr USACHPPM [mailto:[EMAIL PROTECTED]] Sent: 11 April 2000 18:38 To: '[EMAIL PROTECTED]' Subject: RE: search results produce everything in the table... well, that's what you designed it to do. what do you want your default no criteria selected results to be? Chris Olive DOHRS Website Administrator [EMAIL PROTECTED] -Original Message- From: Richard Hart [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 11, 2000 12:23 PM To: House of Fusion Subject: search results produce everything in the table... Hi, I have a simple search form on which you can search on three criteria. However when I type nothing in the form and hit submit it gives me everything in the table. I have tried to over-ride this to no effect. Can anyone point me in the right direction? Thanks, Richard .. In the results page I have something like: CFQUERY NAME="blahblah" DATASOURCE="blahblah" blahblah CFIF Trim(VariableOne) IS NOT "" AND FieldOne LIKE '%#Trim(Form.VariableOne)#%' /CFIF CFIF Trim(VariableTwo) IS NOT "" AND FieldTwo LIKE '%#Trim(Form.VariableTwo)#%' /CFIF CFIF Trim(VariableThree) IS NOT "" AND FieldThree LIKE '%#Trim(Form.VariableThree)#%' /CFIF balhblah /CFQUERY -- -- -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf _talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
Re: search results produce everything in the table...
Like so? cfif isdefined("searchpattern") cfqueryargs/cfquery cfoutputoutput/cfoutput cfelse bYou did not enter any arguments./b /cfif -Original Message- From: Richard Hart [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Thursday, April 13, 2000 11:31 AM Subject: RE: search results produce everything in the table... if nothing is typed in I want no results to be returned or at least no results shown. -Original Message- From: Jeff Shepler [mailto:[EMAIL PROTECTED]] Sent: 11 April 2000 19:14 To: '[EMAIL PROTECTED]' Subject: RE: search results produce everything in the table... Since the search is only restricted to what you type in, if you leave it blank the search is not restricted. Hence the entire table is returned. What would you like to have happen instead? -Original Message- From: Richard Hart [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 11, 2000 12:23 PM To: House of Fusion Subject: search results produce everything in the table... Hi, I have a simple search form on which you can search on three criteria. However when I type nothing in the form and hit submit it gives me everything in the table. I have tried to over-ride this to no effect. Can anyone point me in the right direction? Thanks, Richard .. In the results page I have something like: CFQUERY NAME="blahblah" DATASOURCE="blahblah" blahblah CFIF Trim(VariableOne) IS NOT "" AND FieldOne LIKE '%#Trim(Form.VariableOne)#%' /CFIF CFIF Trim(VariableTwo) IS NOT "" AND FieldTwo LIKE '%#Trim(Form.VariableTwo)#%' /CFIF CFIF Trim(VariableThree) IS NOT "" AND FieldThree LIKE '%#Trim(Form.VariableThree)#%' /CFIF balhblah /CFQUERY -- -- -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf _talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
Re: search results produce everything in the table...
Maybe do something like this?? CFIF NOT Len(form.whatever) BSorry you must type something/B CFELSE run the query or whatever it is you want to do /CFIF Fred T. Sanders Galveston Island, TX -- Having a bad day? Imagine this... You are in total seclusion from that hectic place called "The World". The soothing sound of a gentle waterfall fills the air with a cascading serenity. The water is clear. You can easily make out the face of the person you are holding underwater. Feeling better? - Original Message - From: "Richard Hart" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 13, 2000 9:36 AM Subject: RE: search results produce everything in the table... sorry I didn't make myself clear. When the user types in nothing I want them to get nothing. -Original Message- From: Olive, Christopher M Mr USACHPPM [mailto:[EMAIL PROTECTED]] Sent: 11 April 2000 18:38 To: '[EMAIL PROTECTED]' Subject: RE: search results produce everything in the table... well, that's what you designed it to do. what do you want your default no criteria selected results to be? Chris Olive DOHRS Website Administrator [EMAIL PROTECTED] -Original Message- From: Richard Hart [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 11, 2000 12:23 PM To: House of Fusion Subject: search results produce everything in the table... Hi, I have a simple search form on which you can search on three criteria. However when I type nothing in the form and hit submit it gives me everything in the table. I have tried to over-ride this to no effect. Can anyone point me in the right direction? Thanks, Richard .. In the results page I have something like: CFQUERY NAME="blahblah" DATASOURCE="blahblah" blahblah CFIF Trim(VariableOne) IS NOT "" AND FieldOne LIKE '%#Trim(Form.VariableOne)#%' /CFIF CFIF Trim(VariableTwo) IS NOT "" AND FieldTwo LIKE '%#Trim(Form.VariableTwo)#%' /CFIF CFIF Trim(VariableThree) IS NOT "" AND FieldThree LIKE '%#Trim(Form.VariableThree)#%' /CFIF balhblah /CFQUERY -- -- -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf _talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
Re: search results produce everything in the table...
Perhaps you should test for a blank form field IE: cfif form.fieldname IS NOT "" search stuff cfelse Ya gots to puts ins a search word! /cfif Please direct all responses to the newsgroup so that all may benefit from my lack of wisdom! - Original Message - From: "Richard Hart" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 13, 2000 9:36 AM Subject: RE: search results produce everything in the table... if nothing is typed in I want no results to be returned or at least no results shown. -Original Message- From: Jeff Shepler [mailto:[EMAIL PROTECTED]] Sent: 11 April 2000 19:14 To: '[EMAIL PROTECTED]' Subject: RE: search results produce everything in the table... Since the search is only restricted to what you type in, if you leave it blank the search is not restricted. Hence the entire table is returned. What would you like to have happen instead? -Original Message- From: Richard Hart [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 11, 2000 12:23 PM To: House of Fusion Subject: search results produce everything in the table... Hi, I have a simple search form on which you can search on three criteria. However when I type nothing in the form and hit submit it gives me everything in the table. I have tried to over-ride this to no effect. Can anyone point me in the right direction? Thanks, Richard .. In the results page I have something like: CFQUERY NAME="blahblah" DATASOURCE="blahblah" blahblah CFIF Trim(VariableOne) IS NOT "" AND FieldOne LIKE '%#Trim(Form.VariableOne)#%' /CFIF CFIF Trim(VariableTwo) IS NOT "" AND FieldTwo LIKE '%#Trim(Form.VariableTwo)#%' /CFIF CFIF Trim(VariableThree) IS NOT "" AND FieldThree LIKE '%#Trim(Form.VariableThree)#%' /CFIF balhblah /CFQUERY -- -- -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf _talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: search results produce everything in the table...
Since the search is only restricted to what you type in, if you leave it blank the search is not restricted. Hence the entire table is returned. What would you like to have happen instead? -Original Message- From: Richard Hart [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 11, 2000 12:23 PM To: House of Fusion Subject: search results produce everything in the table... Hi, I have a simple search form on which you can search on three criteria. However when I type nothing in the form and hit submit it gives me everything in the table. I have tried to over-ride this to no effect. Can anyone point me in the right direction? Thanks, Richard .. In the results page I have something like: CFQUERY NAME="blahblah" DATASOURCE="blahblah" blahblah CFIF Trim(VariableOne) IS NOT "" AND FieldOne LIKE '%#Trim(Form.VariableOne)#%' /CFIF CFIF Trim(VariableTwo) IS NOT "" AND FieldTwo LIKE '%#Trim(Form.VariableTwo)#%' /CFIF CFIF Trim(VariableThree) IS NOT "" AND FieldThree LIKE '%#Trim(Form.VariableThree)#%' /CFIF balhblah /CFQUERY -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
Re: search results produce everything in the table...
Try this: Check to see if your form fields are submitted: if not, then stop them and give an error message. CFIF NOT IsDefined("FORM.FieldNames") STOP AND GO BACK! CFABORT /CFIF = "Always Drink Upstream From The Herd!" David Hannum Web Analyst/Programmer Ohio University [EMAIL PROTECTED] (740) 597-2524 - Original Message - From: Jeff Shepler [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, April 11, 2000 1:14 PM Subject: RE: search results produce everything in the table... Since the search is only restricted to what you type in, if you leave it blank the search is not restricted. Hence the entire table is returned. What would you like to have happen instead? -Original Message- From: Richard Hart [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 11, 2000 12:23 PM To: House of Fusion Subject: search results produce everything in the table... Hi, I have a simple search form on which you can search on three criteria. However when I type nothing in the form and hit submit it gives me everything in the table. I have tried to over-ride this to no effect. Can anyone point me in the right direction? Thanks, Richard ... In the results page I have something like: CFQUERY NAME="blahblah" DATASOURCE="blahblah" blahblah CFIF Trim(VariableOne) IS NOT "" AND FieldOne LIKE '%#Trim(Form.VariableOne)#%' /CFIF CFIF Trim(VariableTwo) IS NOT "" AND FieldTwo LIKE '%#Trim(Form.VariableTwo)#%' /CFIF CFIF Trim(VariableThree) IS NOT "" AND FieldThree LIKE '%#Trim(Form.VariableThree)#%' /CFIF balhblah /CFQUERY -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.