Doug wrote:
> 
> I have two tables
> 
> categories:     (This table is populated with the categories already)
> [id] pri key
> category
> 
> sub_categories     (This table is empty)
> [id] pri key
> cat_id FK to categories.id
> sub_category
> 
> I want to insert a comma delimeted list into the sub_categories table.

<cfloop list="#myList#" index="listItem">
  <cfquery ...>
    INSERT INTO sub_categories (cat_id, sub_category)
    VALUES (
      <cfqueryparam value="#something#">,
      <cfqueryparam value="#listItem#">
      )
  </cfquery>
</cfloop>

Jochem

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:248873
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to