Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Multiple SQL "where" clauses
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Multiple SQL "where" clauses

 Post Reply Post Reply Page  <12
Author
ub3rl337ch3ch View Drop Down
Senior Member
Senior Member
Avatar

Joined: 16 February 2005
Location: Australia
Status: Offline
Points: 341
Post Options Post Options   Thanks (0) Thanks(0)   Quote ub3rl337ch3ch Quote  Post ReplyReply Direct Link To This Post Posted: 21 February 2005 at 9:22pm
yeah, ok, i typed that in wrong in the post... I had the quotes for the and 2.x, i just forgot to post them...
Back to Top
dj1811 View Drop Down
Newbie
Newbie


Joined: 11 February 2005
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj1811 Quote  Post ReplyReply Direct Link To This Post Posted: 22 February 2005 at 12:28am

My feeling is you are trying to do this:

table x
ID 1 2
1  a c
2  a d
3  b c
 
You want to select "a" from column 1 and "d" from column 2, so your recordset would be:
 
2  a d
 
To accomplish this is simply :
 
"SELECT * FROM x WHERE 1='" & Request.Form("1") & "' AND 2='" & Request.Form("2") & "'"
 
If that is, in fact, what you are trying to do and it is not working for you, check the syntax carefully.
 
If that isn't what you are trying to do, then need more info. Maybe you could post a quick example of what you are trying to do? Or, are you getting an error message?


Edited by dj1811 - 22 February 2005 at 3:17am
Back to Top
 Post Reply Post Reply Page  <12

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.