Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL query query 1

Status
Not open for further replies.

pwinstanley

IS-IT--Management
Nov 23, 2000
22
GB
I'm an passing a variable from one page another using the query string method. The variable passed is called playback. How can I incorporate this value in an SQL query. Eg. select * from products where series = <the value of playback>

I can easily display this value in the results page using Request.QueryString but I'm struggling to get the sql part to work.

any help is appreciated

Thanks
Paul
 
Quite straightforward this...

SQL = &quot;Select * from Products where series=&quot; & Request.Querystring(&quot;playback&quot;)

The variable SQL can now be executed normally.

G -GTM Solutions, Home of USITE-
-=
 
request(&quot;variable&quot;)
if you called file.asp?variable=..

or request.form(&quot;variable&quot;)
if &quot;variable&quot; was the name of an element in the
form which called file.asp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top