Storing Arrays in a Database Using JSON
Sunday, July 17, 2011

Sometimes you need to store arrays in your MySQL (or other relational) database, but don’t want to spread the information over multiple tables. For instance, I have been working on a CMS for a website, where you need to be able to add a variable selection of images, download links and products to the page configuration. Storing these sets of information in a single field was obviously a far cleaner solution. However, I needed a simple way to encode/decode the data. (more…)

Posted by James at 12:32 pm   0 comments