
May 17th, 2001, 08:31 AM
|
|
Contributing User
|
|
Join Date: Dec 2002
Posts: 14,578
  
Time spent in forums: < 1 sec
Reputation Power: 22
|
|
|
<i><b>Originally posted by : Saurabh Kalra (saurabh_kalra123@rediffmail.com)</b></i><br />Hi Shannon,<br />Here is the reply to your query.<br /><br />I am sending you the code if have any queries related to it you can send me mail on my id <br />which is:-<br />"saurabh_kalra123@rediffmail.com"<br /><br />------CODE STARTS HERE------<br /><br /><%<br /> set con=createobject("adodb.connection")<br /> con.open "dsn=module"<br /> set rec=Createobject("adodb.recordset")<br /> str="select * from table2 where name='" & nm & "' and course='"&co&"'"<br /> rec.open str,con<br /> while rec.eof<>true<br /> i=i+1<br /> rec.movenext<br /> wend<br /> if i>0 then<br /> rec.movefirst<br /> response.write(rec("year"))<br /> else<br /> response.write("Search resulted in Zero(0) matches")<br /> end if<br />%><br />------End of the code-------------<br />------------<br />Shannon at 5/16/2001 8:24:51 AM<br /><br />This probably comes easy to most of you, but I'm a beginner. I want to pass two values I guess is the way to say it. When a customer clicks on a link that is stored in the database... I want that link to pull a certain product id(1st value) and also just pull a certain category(2nd value) of the the certain product.<br />The link in the browser should look something like this>> "http://crweb1/cattle/cattle.asp?CU_ID=1&Category=01B2" and it does. The problem is getting the query on the this page to pull both those values. What code should the query have to pull records based on the two criteria. I.E. CU_ID & Category<br /><br /><br />Thanks a ton !<br /><br />
|