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…)

Practical Web 2.0 Applications with PHP (Expert's Voice) by Quentin Zervaas
Beginning Databases with PostreSQL: From Expert to Professional 2nd Edition: From Novice to Professional by Neil Matthew, Richard Stones