Hmmm... getting an error in this context:
"Error executing database query: Operand should contain 1 column(s)"
Should this work? With the sub-select stuck in the middle of the first,
it would seem not... I wonder about querying for the photos separately,
and looping through the list for the photo display. ??? The photos all
have unique mls numbers attached to them, so I can relate them to the
property via the mls_number of the property and the photos.
<cfquery name="get_property" datasource="#dsn#">
select sa.property_id, sa.street_number, sa.street_name, sa.city, sa.state,
sa.public_remarks_01, sa.public_remarks_02, sa.public_remarks_03,
sa.public_remarks_04,
sa.list_price, sa.advertised_subdivision, sa.elementary_school,
sa.middle_school,
sa.high_school,
sa.listing_office, sa.property_type,
(select sap.photo_filename as prop_photo_filename_01,
sap.photo_filename as prop_photo_filename_02,
sap.photo_filename as prop_photo_filename_03
from smlc_acr_photos sap where sap.photo_mls_number =
sa.mls_number limit 3)
from smlc_acr sa
where sa.property_id = '#url.property_id#'
</cfquery>
> -----Original Message-----
> From: Claude Schneegans [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 24, 2008 9:06 AM
> To: CF-Talk
> Subject: Re: How do I select multiple fields as multiple aliases?
>
> >>Would this work?
>
> Like this no, but this should work:
>
> select sap.photo_filename as prop_photo_filename_01,
> sap.photo_filename as prop_photo_filename_02,
> sap.photo_filename as prop_photo_filename_03
> from smlc_acr_photos sap
> where sap.photo_mls_number = sa.mls_number limit 3
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304178
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4