2012
01.26

It took a couple of hours to finally end up with the conclusion, that
ORDER BY statements does not work in MySQL subquery.

2012
01.10

Today I realized theres a pretty simple way, to generate JSON straight from MySQL.

I use it this way:

1
SELECT CONCAT('[',GROUP_CONCAT(CONCAT('{name:',USER.name,''),CONCAT(',email:',USER.email,'}')),']') FROM USER WHERE STATUS = 'active' ORDER BY created ASC