On 4/30/00, Chris Giminez penned:
>Let me give you an example:
>
>Say I run a query for a real estate listing (this isn't what I'm 
>doing, but it correlates well)
>
><CFQUERY NAME="property_detail" DATASOURCE="properties">
>SELECT      *
>FROM         Listing
>WHERE       (Listing.Id = '#url.id#')
></CFQUERY>
>
>Now, lets say this returns the address, city, zip, price, etc along 
>with 5 ID's of agents that have
>shown this particular property. The format would be the agent's initials.
>
>Now I want to display the agent's full name and email on the same page.
>
>The table containing this might be something like:
>
>Agent_Id    Name    LName    Email
>CSG            Chris    Giminez    [EMAIL PROTECTED]
>...and so on....

You most certainly could do it the way I said. Place the agent ID in 
the listings table:

SELECT      agents.*,listing.*
FROM         agents,Listing
WHERE      agents.agent_id = listing.agent_id and  (Listing.Id = '#url.id#')


Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to