PHP Classes
elePHPant
Icontem

MySQL to JSON: Convert data from MySQL query results into JSON

Recommend this page to a friend!

  Author Author  
Picture of Adnan Siddiqi
Name: Adnan Siddiqi <contact>
Classes: 1 package by
Country: Pakistan Pakistan
Innovation award
Innovation award
Nominee: 1x


  Detailed description   Download Download .zip .tar.gz   Install with Composer Install with Composer  
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.

  Classes of Adnan Siddiqi  >  MySQL to JSON  >  Download Download .zip .tar.gz  >  Support forum Support forum (4)  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: MySQL to JSON
Base name: mysql2json
Description: Convert data from MySQL query results into JSON
Version: 1.0.0
PHP version: -
License: The PHP License
 
  Groups   Trackback   Applications   Files Files  

  Groups  
Group folder image Databases Database management, accessing and searching View top rated classes


  Innovation Award  
PHP Programming Innovation award nominee
July 2006
Number 3
Since the raise of interest on the development AJAX based applications, JavaScript Object Notation (JSON) has became a relevant topic.

JSON is often used by Web server applications to serialize objects that are recreated on the browser side by Javascript code that handles AJAX based interactions.

A great part of the AJAX applications are database driven. Frequently, PHP applications retrieve data from MySQL databases to respond to AJAX requests.

This class helps implementing AJAX based PHP database driven applications with MySQL by serializing query results using JSON.

Manuel Lemos

  Pages that reference this package  
links for 2006-12-24
Daily Links...
More PHP goodies
Here’s a PHP basic authenticator class by David Wilkinson and a MYSQL recordset to JSON convertor by Adnan Siddiqi. Handy little things...
My class in Top 10
My class Mysql to JSON is ranked 8th this week in Top Downloaded Class section...
November 11, 2007
I have been tinkering with trying to get mysql directly into JSON.
PHP-Based MySQL-to-JSON Converter
A new PHP component by Adnan Siddiqi accepts a MySQL result set and converts it into a JSON message...
PHP-Based MySQL-to-JSON Converter
A new PHP component by Adnan Siddiqi accepts a MySQL result set and converts it into a JSON message...

Latest pages that reference packages Latest pages that reference packages


  Applications that use this package  
No pages of applications that use this class were specified.

Add link image If you know an application of this package, send a message to the author to add a link here.

  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example Example
Accessible without login Plain text file jsontest2.html Data HTML file parsing returned JSON data
Plain text file mysql2json.class.php Class Main Class File
Accessible without login Plain text file README.txt Doc. Help File

Install with Composer Install with Composer - Download Download all files: mysql2json.tar.gz mysql2json.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.