Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. 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 Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 20th, 2003, 02:21 PM
Registered User
Join Date: Jun 2003
Location: , NY, .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQL , List Boxes/Menu Boxes, DB's

I am sure this has been asked before...sorry if it has.

I am making a page that when you submit it, based upon static criteria in 3 seperate listboxes/menu boxes on the first page will produce a query to a second page with the results.

For example:
List Box 1 is name Letter, List Box 2 is age, List Box 3 is Gender...

Whatever you choose in the 3 boxes will give you the outcome on the second page. So based upon that criteria, if you chose Letter A, age of 22, Gender of Female... it would give you those results from an Access/MySQL DB. All names starting with the letter A who is 22 and is female.

I have never done anything like this and would like to get into the advance arena of this type of web design.

Can either someone help me with the code or give me a webpage which explains how this is done? I am not looking for handouts, but it's something that is driving me up a wall. ASP101 didn't seem to have anything and I am not familiar with other good sites. Any help would be great. Thanks.

BTW...does adding Pictures in a DB cause a quicker corruption in data in a DB?
Reply With Quote
  #2 (permalink)  
Old June 30th, 2003, 04:07 AM
arp arp is offline
Authorized User
Join Date: Jun 2003
Location: Mumbai, Maharashtra, India.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts

hi!! you can do it with following query to your database

consider you collect three values as follows

nameChar = Request.Form("Listbox_1")
age = Request.Form("Listbox_2")
gender = Request.Form("Listbox_3")

query will be as follows

"Select * from [TABLENAME] where [NAMECOLUMN]='"&nameChar&"%' and [AGECOLUMN]="& age&" and [GENDERCOLUMN]='"& gender&"'"

Here I considered age datatype as number

According example given by you it will be

"Select * from [TABLENAME] where [NAMECOLUMN]='A%' and [AGECOLUMN]=22 and [GENDERCOLUMN]='female'"
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LIST BOXES Vision G Access 10 May 27th, 2006 01:45 AM
List Boxes, Help! JeffGirard Access 17 August 22nd, 2005 01:31 PM
Dynamic Menu - Using multiple dropdown boxes Sebastiaan Javascript How-To 2 December 1st, 2003 05:36 AM
Dynamic Menu - Using multiple dropdown boxes Sebastiaan Classic ASP Basics 3 June 7th, 2003 06:38 AM

All times are GMT -4. The time now is 12:43 PM.

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