PHP Classes

MyJSON: Return MySQL query results in JSON format

Recommend this page to a friend!
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2021-11-07 (9 months ago) RSS 2.0 feedNot enough user ratingsTotal: 356 All time: 6,899 This week: 251Up
Version License PHP version Categories
myjson 1.0.1GNU General Publi...5.3PHP 5, Databases
Description Author

This class can return MySQL query results in JSON format.

It connects to a given MySQL server using the PDO extension and executes a given SQL query.

The class can return the query result values in JSON format. Optionally it may add line breaks and spaces to make the resulting JSON string more readable.

Picture of Shibly
Name: Shibly <contact>
Classes: 7 packages by
Country: Bangladesh Bangladesh
Age: 37
All time rank: 69711 in Bangladesh Bangladesh
Week rank: 267 Up9 in Bangladesh Bangladesh Up

# MySql_to_Json

`mysql_to-json` is a php class that will allow you to create json string from a mysql query with the MySQLtoJSON method with 1 or 2 parameters.

1. $query - The mysql query (required)
2. $indented - If true, the return string will be indented

`mysql_to_json` is build with the top of PDO. It is still in development stage. This is the first release. Feel free to fork.  
  Files folder image Files  
File Role Description
Accessible without login Plain text file .gitignore Data Auxiliary data
Plain text file MyJSON.php Class Class source
Accessible without login Plain text file Doc. Documentation

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:6,899
This week:251Up
For more information send a message to info at phpclasses dot org.