Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Insert a Coldfusion struct into a database

If I wanted to save a contact form submission to the database, how can I insert the form scope in as the submission? It's been some time since I used Coldfusion.

The contact forms vary depending on what part of the site it was submitted from, so it needs to scale and handle a form with 5 fields or one with 10 fields. I just want to store the data in a blob table.

like image 295
Kevin Avatar asked Dec 29 '22 13:12

Kevin


1 Answers

Most space efficient way and least complicated to turn back into original shape is using serializeJSON. After that, you can use something like key:value|key:value, or XML representation of your struct.

like image 178
zarko.susnjar Avatar answered Dec 31 '22 13:12

zarko.susnjar