0

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 '%::SearchValue::%') ORDER BY State ASC"

2
Contributors
2
Replies
3
Views
13 Years
Discussion Span
Last Post by ymcapa
0

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!

0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.