I am having trouble with a sql statement. I have a
form where a user selects a state and Category and the
output is people in the db who match both. Everything
I have tried I only get one result.Here is my latest
attempt:

<cfquery name=getID datasource="#application.DSN#">
SELECT  e.CategoryID, e.PhotographerID, p.CompanyName
FROM   tbPhotographers  p
INNER JOIN tbevent e
ON p.PhotographerID = e.PhotographerID 
WHERE e.CategoryID = #FORM.Category#
</cfquery>

<CFQUERY NAME="searchresults"
DATASOURCE="#application.DSN#">
SELECT  i.PhotographerID, i.WorkPhone, a.City,
a.State, a.ZipCode
FROM   tbPhotographerAddress a
INNER JOIN tbContactInfo i
ON a.PhotographerID = i.PhotographerID 
WHERE i.PhotographerID = #getID.PhotographerID#
AND a.State = "#form.State#"
</CFQUERY>

This works but it only gives me one result and I know
there should be more. I am a beginner and have been
working on this to long so any help would be
appreciated!

Thanks,
DA

__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com

-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org

Reply via email to