How do I use the JSON_encode function with mysql query results, do I need to iterate through the rows or can I just apply it to the entire results object?
stackoverflow.com