Your person_IDs var probably holds a list of IDs (or a single ID)....so you 
need to use an IN cluse in your first SELECT to get multuple records to then 
use to loop over and do your inserts.

like so:

<head>
<CFQUERY NAME="get_people" DATASOURCE="taskomatic">
  SELECT person_id FROM people
  WHERE person_id IN (<cfqueryparam value="#Form.person_id#" 
cfsqltype="cf_sql_integer" list="yes">)
</CFQUERY>
</head>

<body>
<CFLOOP QUERY="get_people">
<CFQUERY NAME="insert_records" DATASOURCE="taskomatic">
INSERT INTO people_project (person_id, project_id)
VALUES ('#person_id#', '#FORM.project_id#')
</CFQUERY>
</CFLOOP>
</body>

Note the FORM scope was removed from Person_ID in the above query as you 
want the individual ID returned from "get_people", and NOT the LIST OF IDs 
that may be in FORM.person_ID

HTH

Cheers

Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): 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:192392
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

Reply via email to