SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseSQL 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:
  #1  
Old September 4th, 2004, 03:29 AM
Kemetian Kemetian is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 26 Kemetian User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 7 sec
Reputation Power: 0
Arrays?

Ok, since I guess Im never going to figure out the JOIN crap that goes with sql maybe I can work with an array. What I want to do is search through one table based on state and county fields and get the UserID(s) from that table where it matches, even if theres more than one.. Then I want to take the UserID(s) from that first table and match it to the UserID(s) in a second table and pull the email field. So a user fills out a form, part of the form has dynamic drop downs where they select a state, then it populates the county dropdown and they select their county. Then when they submit this it will go through table1 and search for UserID based on the St. and Co. that were chosen, then match the UserID(s), to the UserID(s) in table2 and get the email field from table2. Ive tried the JOIN stuff, doesnt work. In table1 the fields are UserID, State, County. In table2 the fields are UserID, name, address, email.
Is it possible to just:
SELECT UserID FROM table1 WHERE State=Whatever AND County=Whatever

and then store this in an array. Then to do something like:
SELECT email FROM table2 WHERE UserID=Array of UserID(s) from table1?

1. Is this possible?
2. How do you store the info from the first select statement into an array, and then in the second select statement tell it to match UserID to the UserIDs in the array??

Any idea on if this is possible and how to do this?

Thanks

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseSQL Development > Arrays?


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 2 hosted by Hostway
Stay green...Green IT