a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Hosting from $3.99 per month!

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions. dd

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Using AND to query

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Using AND to query
Page: [1]
 
A1234

 

Posts: 101
Joined: 10/7/2004
Status: offline

 
Using AND to query - 12/2/2004 19:30:18   
I have a search page using 2 drop down boxes. I want to have it where the user must select a term from each drop down. This is the code I am using..

fp_sQry="SELECT * FROM Users WHERE (x_State LIKE '%::x_State::%' AND ProgramType LIKE '%::ProgramType::%')"

Right now the user cannot search by just using the "State" drop down, but they can search by just using the "Program Type" drop down. Is something missing from the code above? :)
Spooky

 

Posts: 26617
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Using AND to query - 12/2/2004 19:38:08   
Use an "ALL" selection for each box.

<option value='%'>All</option>

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to A1234)
A1234

 

Posts: 101
Joined: 10/7/2004
Status: offline

 
RE: Using AND to query - 12/2/2004 19:48:48   
Thanks...actually I am using an All option in both boxes

<option value="%">All States</option>
<option value="%">All Program Types</option>

Wanna have a look see? You can select and search from the Program Type box without selecting from the State box :)

http://www.fleetquestcareers.com/schoolsearch.asp

(in reply to A1234)
BeTheBall

 

Posts: 6385
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Using AND to query - 12/2/2004 21:26:52   
I get "no records returned" when not choosing an option from the state dropdown. What do you expect to happen?

< Message edited by BeTheBall -- 12/2/2004 21:33:22 >


_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to A1234)
A1234

 

Posts: 101
Joined: 10/7/2004
Status: offline

 
RE: Using AND to query - 12/2/2004 21:33:26   
Thanks for your help...I believe I have it working...I really don't know what I did to get it working...I just started over from scratch and it came together. This DRW is so sensitive! :) :)

(in reply to A1234)
Page:   [1]
OutFront Discoveries

All Forums >> Web Development >> ASP and Database >> Using AND to query
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts