943,681 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 4134
  • ASP RSS
May 23rd, 2004
0

force Search Page to return no records on open

Expand Post »
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"
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ymcapa is offline Offline
2 posts
since May 2004
May 24th, 2004
0

Re: force Search Page to return no records on open

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!
Team Colleague
Reputation Points: 262
Solved Threads: 18
a.k.a inscissor
samaru is offline Offline
1,227 posts
since Feb 2002
May 24th, 2004
0

Re: force Search Page to return no records on open

Quote 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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ymcapa is offline Offline
2 posts
since May 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: ASP Replace Function....
Next Thread in ASP Forum Timeline: Error including Parent directory files





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC