I have two tables

[tasks]
        task_id
        task_summary
        task_owner_id (foreign key driver_id from [drivers])
        task_assignee_id (foreign key driver_id from [drivers])

[contacts]
        contact_id
        contact_fullname

I want to write a query that joins the two tables and allows me to display
the full names of both owner and assignee for a task

SELECT *
FROM tasks
JOIN priorities ON priority_id = tasks.task_priority
JOIN contacts as owner ON owner.contact_id = tasks.task_owner_id
JOIN contacts as assignee ON assignee.contact_id = tasks.task_assignee

Why do I get an error when I try to output #owner.contact_fullname# ?

Cheers Colin.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to