User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 392,080 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,040 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 3274 | Replies: 2
Reply
Join Date: May 2004
Posts: 2
Reputation: ymcapa is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
ymcapa ymcapa is offline Offline
Newbie Poster

Help force Search Page to return no records on open

  #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"
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2002
Location: Long Island, NY
Posts: 1,134
Reputation: samaru is just really nice samaru is just really nice samaru is just really nice samaru is just really nice 
Rep Power: 12
Solved Threads: 2
Colleague
samaru's Avatar
samaru samaru is offline Offline
a.k.a inscissor

Re: force Search Page to return no records on open

  #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  
Join Date: May 2004
Posts: 2
Reputation: ymcapa is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
ymcapa ymcapa is offline Offline
Newbie Poster

Re: force Search Page to return no records on open

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb ASP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the ASP Forum

All times are GMT -4. The time now is 12:20 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC