Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: Active Server Pages (ASP)
Expertise: Beginner
Jan 10, 2000



Application Security Testing: An Integral Part of DevOps

Limiting Search Results

When my clients enter searching criteria, I want to limit the number of results. For example, if the number of results is over 100, I want the user to have to go back and try the search again. How can I do this?

An easy way is to do a SELECT COUNT(*) FROM ... WHERE ... so that you get the number of records instead of the records. If you get too many, display that fact to the user. If not, do the other query. An alternative is to do the whole query, but only let the user see 100 results—keep a counter going while you're dumping the records out.

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date