Thank you sooooo much. I have not used CF in about 6 years and have totally forgotten everything. :( Well, maybe it will come back slowly.
Thanks again Doug ----- Original Message ----- From: "James Holmes" <[EMAIL PROTECTED]> To: "CF-Talk" <cf-talk@houseoffusion.com> Sent: Saturday, August 05, 2006 11:23 PM Subject: Re: problem with insert > Assuming then that the variable for the cat_id is "myCatID" then you > are after this kind of thing: > > <cfset mylist="Advertising,tools"> > <cfset myCatID = 1> > <cfloop list="#mylist#" index="listItem"> > <cfquery datasource="classifieds"> > INSERT INTO sub_categories (sub_category,cat_id ) > VALUES (<cfqueryparam cfsqltype="cf_sql_varchar" > value="#listItem#">,<cfqueryparam cfsqltype="cf_sql_numeric" > value="#myCatID #">) > </cfquery> > </cfloop> > > On 8/6/06, Doug <[EMAIL PROTECTED]> wrote: > > I will just do a cfset and insert it manually into the query. Each cat_id > > will be identical for each set of sub_categories. > > > > > > ----- Original Message ----- > > From: "James Holmes" <[EMAIL PROTECTED]> > > To: "CF-Talk" <cf-talk@houseoffusion.com> > > Sent: Saturday, August 05, 2006 8:41 PM > > Subject: Re: problem with insert > > > > > > > For a given list of subcategories you want to insert, where is the > > > cat_id coming from? > > -- > CFAJAX docs and other useful articles: > http://www.bifrost.com.au/blog/ > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:248938 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4