Closed Thread Icon

Topic awaiting preservation: querystring variable (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=12272" title="Pages that link to Topic awaiting preservation: querystring variable (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: querystring variable <span class="small">(Page 1 of 1)</span>\

 
Ensabanur
Bipolar (III) Inmate

From: KY
Insane since: Nov 2001

posted posted 06-17-2002 20:36

I am calling a variable from one page to another: "lookup.asp?article=ps1" using request.querystring

article1 = request.querystring("article")
How can I use article1's value in the select string: ["select * from table where id= "value of article 1"]

any help would be appreciated.
Thanks
Enas

ZOX
Bipolar (III) Inmate

From: Southern Alabama, USA
Insane since: Sep 2000

posted posted 06-17-2002 21:01

"SELECT * FROM table WHERE ID=" & article1 & ""

should work, I think, though I often have problems getting the "'s right.

Ensabanur
Bipolar (III) Inmate

From: KY
Insane since: Nov 2001

posted posted 06-17-2002 21:08

DIdn't work, it says too few paramaters.

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 06-17-2002 21:35

what language are you using?

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 06-17-2002 22:24

tis' asp pugz. (it's in that query string but not very clear)



.:[ Be Bert. Be Ernie. Just be. ]:.

someoneInverse
Bipolar (III) Inmate

From:
Insane since: May 2002

posted posted 06-18-2002 09:34

I think

code:
article1 = request.querystring("article")
strSQL = "select * from table where id='" & article1 & "'"


should do you if the article1 variable is a string rather than a numeric value

hth
I:.

dk01
Bipolar (III) Inmate

From: dk's house of love
Insane since: Oct 2001

posted posted 06-18-2002 13:17

ID is almost always a numeric value though so I'd think:

code:
article1 = request.querystring("article")
strSQL = "select * from table where id=" & article1 & ";"


-dk

- can't decide? have another drink.

Ensabanur
Bipolar (III) Inmate

From: KY
Insane since: Nov 2001

posted posted 06-18-2002 14:38

Thanks for the help guys.
The article1 was a string. IT's for a help database for my school. I have a ton of naive faculty that do the dumbest things t otheir computers. In either case, I got it working thanks to your help.
IT's much appreciated.
Ensa

« BackwardsOnwards »

Show Forum Drop Down Menu