PHP-Based MySQL-to-JSON Converter
via ajaxian
A new PHP component by Adnan Siddiqi accepts a MySQL result set and converts it into a JSON message. MySQL To JSON:
This class can be used to convert data from MySQL query results into a JavaScript expression in JavaScript Object Notation.
It takes a MySQL query result handle and retrieves the query result column names and the query result data.
The class generates the definition of a JavaScript object in JSON that contains an array of a rows of query result data.
Each array element represents an object with the properties set to the query result column names. The property values are the query results for the respective row and column.
Leave a Reply
You must be logged in to post a comment.