Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 7th, 2006, 11:31 PM
Authorized User
 
Join Date: Sep 2005
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default help with Database searching

i have a table in a database that saves search activity, it has the following 3 columns:

search_ID (autonumber)
State (text)
Language (text)

what i want to be able to do is create a page that will display the number of searches/filters based on a language. here's what the output would look like:

Count Language
-----------------------
25 English
18 Spanish
14 Russian

so if only those languages were searched there would be only 3 rows, however if more languages would be searched more rows would show up. how would the sql look like??

 
Old February 8th, 2006, 07:30 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

Code:
SELECT COUNT(*) AS searchCount, language 
FROM yourTableName
GROUP BY language
ORDER BY COUNT(*) DESC;
HTH,

Chris





Similar Threads
Thread Thread Starter Forum Replies Last Post
searching a database mark jonas MySQL 13 January 19th, 2007 10:01 AM
Searching through a database d5t ASP.NET 1.0 and 1.1 Basics 6 October 27th, 2006 07:10 AM
Searching the database...HELP! Zedman BOOK: Beginning ASP 3.0 6 September 30th, 2004 09:52 AM
Searching trough a database toni_montana PHP How-To 2 September 25th, 2004 09:17 AM
searching a database shabazzk Classic ASP Databases 2 March 10th, 2004 06:56 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.