.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
  #1  
Old May 16th, 2001, 10:24 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,578 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
Pulling from database based on two criteria being passed

<i><b>Originally posted by : Shannon (swilson@purebredindustries.com)</b></i><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 />

Reply With Quote
  #2  
Old May 17th, 2001, 08:31 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,578 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
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 />

Reply With Quote
Reply

Viewing: ASP Free ForumsProgramming.NET Development > Pulling from database based on two criteria being passed


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway