Not exactly what I had in mind.

Instead of doing a loop over the array of structures and doing an
insert each for each structure, you can  do
<cfquery name="blah" datasource="dsn">
insert (field1, field2, field3)
values (
<cfloop index="x" from="1" to="lenarray">
arrayname[x,value1], arrayname[x,value2], arrayname[x,value3]
</cfloop>
)
</cfquery>

Note: syntax not correct - just for illustration.


On Sat, Feb 14, 2009 at 7:08 PM, Mike Soultanian <msoul...@csulb.edu> wrote:
>
> I found the following for mysql:
>
> http://dev.mysql.com/doc/refman/5.1/en/load-data.html
>
> I'm assuming I'd just wrap that with a cfquery statement?
>
> Any idea on how to convert an array of structs to a comma-delimited text
> file?
>
> thanks!
> Mike
>
> Mike Soultanian wrote:
>> mysql.. I have admin access to my instance...
>>
>> Maureen wrote:
>>> Which database?  Do you have bulk insert capabilities?
>>>
>>> On Sat, Feb 14, 2009 at 5:28 PM, Mike Soultanian <msoul...@csulb.edu> wrote:
>>>> Hey everyone,
>>>> I am pulling a song listing from another website that's in JSON format.
>>>>  I already figured out how to bring it into CF with deserializeJSON(),
>>>> but now I need to put all that data into my database.  There are over
>>>> 60,000 songs in their database so that means I have to insert over
>>>> 60,000 structs (song title, artist, id, etc) into my database.  What is
>>>> the most efficient way to do this?
>>>
>>
>>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319337
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to