force Search Page to return no records on open

Reply

Join Date: May 2004
Posts: 2
Reputation: ymcapa is an unknown quantity at this point 
Solved Threads: 0
ymcapa ymcapa is offline Offline
Newbie Poster

force Search Page to return no records on open

 
0
  #1
May 23rd, 2004
I have a page that is primarily designed to search the database for all entries within the entered state.

I'd like to open the page with no results being returned in the results form. Currently when the page is loaded it returns all the records in the db.

Here is the select statement:
"SELECT * FROM National WHERE (State like '%:earchValue::%') ORDER BY State ASC"
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 1,135
Reputation: samaru is just really nice samaru is just really nice samaru is just really nice samaru is just really nice 
Solved Threads: 6
Team Colleague
samaru's Avatar
samaru samaru is offline Offline
a.k.a inscissor

Re: force Search Page to return no records on open

 
0
  #2
May 24th, 2004
So you want a query that returns zero results? If so, does that SQL statement have to remain unmodified? Please be a tad clearer. Thanks!
Reply With Quote Quick reply to this message  
Join Date: May 2004
Posts: 2
Reputation: ymcapa is an unknown quantity at this point 
Solved Threads: 0
ymcapa ymcapa is offline Offline
Newbie Poster

Re: force Search Page to return no records on open

 
0
  #3
May 24th, 2004
Originally Posted by inscissor
So you want a query that returns zero results? If so, does that SQL statement have to remain unmodified? Please be a tad clearer. Thanks!
I wanted the results to be empty when the user first loads the page so that they can then search for the info they desire. I solved the problem in the hyperlink instead of the SQL statement by adding "?searchvalue=ST" to the end of the url.

Since no state has the abbreviation "ST" this returns empty results on load.

here is the page in question if you want to look: www.ymcayg.org
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC