|
#1
|
|||
|
|||
|
sql select with where clause
[Originally posted by jack]
Ok I have now tried to use an sql statement, like this <!--#include file="Email_datalink.asp"--> Dim objrs Set oConn = Server.CreateObject("ADODB.Connection") oConn.Open objConn˙ ˙ ˙ ˙ ˙ 'from include file at top of page strSQL = "SELECT * FROM qrycc_main " _ ˙ ˙ ˙ & "WHERE Resort LIKE '" & Request.Form("dropresort") & "'" Set oRs = oConn.Execute(strSQL) How do I pass another field into the where clause form the request page?? any help very much appreciated Cheers Jack |
|
#2
|
|||
|
|||
|
Re:sql select with where clause
[Originally posted by JAG]
use an AND SELECT * FROM table WHERE columA='x' and columB ='y' grtz <b>JAG</b> |
|
#3
|
|||
|
|||
|
Re:Re:sql select with where clause
[Originally posted by jack]
But I need to pass the values as two variables from one request page with two drop down boxes which act as user choices, so I cant just write the values in!! Jack |
|
#4
|
|||
|
|||
|
Re:Re:Re:sql select with where clause
[Originally posted by gonzalo]
did you tryed to use 2 different sql commands? one for each drop down boxes? |
|
#5
|
|||
|
|||
|
how to select latest data from database
[Originally posted by k2]
how to select latest data from database ??? |
|
#6
|
|||
|
|||
|
Re:sql select with where clause
[Originally posted by Bernie Lawrence]
You can have as many fields passed and used in the sql statement as you want.˙ For instance, if you also wanted to make sure the Location was equal to something and you passed it the input from your form as location then you could add it to the SQL statement as follows. strSQL = "SELECT * FROM qrycc_main " _ ˙ ˙ ˙ & "WHERE Resort LIKE '" & Request.Form("dropresort") & "' AND Location LIKE '" & Request.Form("location") & "'" |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|