Skip to main content
Known Participant
June 20, 2007
Question

Possible to insert array into db without looping?

  • June 20, 2007
  • 1 reply
  • 282 views
Hi there,

I'm working on a Flex project that uses cfc's and MySQL. I have an ArrayCollection that I want to store in my db. I was thinking that I could store it as a BLOB. I'm taking a stab at it now but I thought I'd put the feelers out to see if anyone has any ideas of how to do this.

Maybe a simpler way to put it:

Is it possible to save an entire array into a database without looping through and storing each item in the array separately?

Thanks.

Novian
This topic has been closed for replies.

1 reply

Inspiring
June 20, 2007
For 1 dimensional arrays, you can either convert the array to a list - ArrayToList() or for more complicated structures you can serialize your data using XML, WDDX (a type of XML) or JSON. WDDX support is native to CF, you can find components online that will give you JSON support or you can roll your own XML conversion.