ur scope is teh query name, get_tasks. Think of the SQL result set as
a table you named get_tasks.
Doug
On Mon, 17 Jan 2005 17:55:41 +0000, Chris Kavanagh <[EMAIL PROTECTED]> wrote:
> Dear list,
>
> I've got this query that gets data from three tables:
>
> <CFQUERY name="get_tasks" datasource="taskomatic">
> SELECT
> tasks.task_id,
> tasks.name,
> tasks.deadline,
> tasks.project_id,
> tasks.importance_id,
> tasks.owner_id,
> projects.project_id,
> projects.name,
> people.person_id,
> people.name,
> importance.importance_id,
> importance.importance
> FROM tasks
> JOIN projects ON tasks.project_id = projects.project_id
> JOIN people ON tasks.owner_id = people.person_id
> JOIN importance ON tasks.importance_id =
> importance.importance_id
> </CFQUERY>
>
> But the trouble is, the CFOUTPUT I thought would work doesn't:
>
> <CFOUTPUT query="get_tasks">
> <td>#tasks.name#</td>
> <td>#projects.name#</td>
> <td>#tasks.deadline#</td>
> <td>#importance.importance#</td>
> <td>#people.name#</td>
> </CFOUTPUT>
>
> ...because it doesn't seem to recognise the scopes ("Element TASKS.NAME
> is undefined in TASKS"). But I need the scopes because I (perhaps
> foolishly) have three fields called "name"! Do I need to make all the
> field names in my database unique, or is there another way?
>
> TIA!
> CK.
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware: a new and convenient web-based time tracking application. Start
tracking and documenting hours spent on a project or with a client with Logware
today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190796
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54