I am trying to write an sql query to get the vacant units from one
property. When I run the query, I get all owners that have vacant
units, disregarding the particular property that the owner's unit
resides.
Here is the code that I have so far.
<cfset hoa="#form.HOA#">
<!---<cfquery datasource="#Request.MainDSN#"
name="vacantunits">
SELECT *
FROM HOAs INNER JOIN owners ON HOAs.hoaID = owners.project
WHERE HOAS.NAME = <cfqueryparam value="#hoa#">
AND owners.vacent = true
</cfquery>
--->
<cfquery datasource="#Request.MainDSN#" name="unit">
SELECT *
FROM OWNERUNITS INNER JOIN OWNERS ON OWNERUNITS.OWNERID =
OWNERS.OWNERID, HOAS
WHERE HOAS.HOAID = OWNERS.PROJECT
AND OWNERS.VACENT = TRUE
</cfquery>
The first query is a reuse from another page that uses a similar query.
The bottom query is the one that I'm trying to get to work.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 by AdobeĀ®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7.
Free Trial. http://www.adobe.com/products/coldfusion
Archive:
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:2581
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15