if you insist on using *, you can do SELECT p.* to select all columns 
from only one table in a join.
but others have already said why selecting * (even from one table) may 
not be a very good idea.

Azadi

On 04/10/2010 21:59 , Rick Faircloth wrote:
> Yes, once I got the query working (except for the duplicate fields)
> I swapped to "select *" to avoid having to type the 50 or so fields
> involved.  It works elsewhere, so I figured it should here.
>
> But as soon as I starting specifically naming the fields, the
> duplication cleared up.
>
> I would love to know why, but I guess that's just the way MySQL
> works with that particular query.  Perhaps it's the way it has
> to be done with a left join.
>
> Anyway, all is well!
>
> Thanks, James!
>
> Rick
>
> -----Original Message-----
> From: James Holmes [mailto:[email protected]]
> Sent: Monday, October 04, 2010 9:12 AM
> To: cf-talk
> Subject: Re: Can't figure out a query to accomplish this...
>
>
> Are you using select * to get the records? If so, get rid of that and
> name the select columns from p.
>
> select p.area, p.bedrooms, p.bathrooms
> from ...
> etc
>
> --
> WSS4CF - WS-Security framework for CF
> http://wss4cf.riaforge.org/
>
>
>
> On 4 October 2010 11:28, Rick Faircloth<[email protected]>  wrote:
>> Spoke (wrote) too soon...
>>
>> I'm getting the correct records, but I just realized
>> I'm getting two of every field returned. �I tried
>> other joins, but can't affect the fields so that I get
>> just one field.
>>
>> How do I modify the query to return just one field
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338041
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to