|Last Updated|| ||Ratings|| ||Unique User Downloads|| ||Download Rankings|
|2017-01-26 (6 months ago) ||Not enough user ratings||Total: 336 ||All time: 6,818 This week: 614|
This package can output database tables to JSON or XML using PDO.
It can connect to a given supported database using PDO like Firebird, MySQL, Oracle, PostgreSQL, SQLite or Microsoft SQL Server.
The class executes a given query or a query to table to retrieve the records of a given table and generates either XML or JSON data from the table record data.
The generated XML or JSON is served for download as the output of the current script.
Retrieve data from database and generate/print JSON or XML file.
This library can be found on Packagist.
We endorse that everything will work fine if you install this through composer.
Add in your
or in your bash:
$ composer require natanaelsimoes/db2file
- PSR-4 compliant for easy interoperability
- Uses PDO to cover majority databases (Firebird, MySQL, Oracle, PostgreSQL, SQLite, Microsoft SQL Server)
- Easy to add support for others PDO database drivers as needed
- Gets and prints JSON/XML version of your tables and queries
docs/ for futher details about this library.
// Database configuration
$driver = DB2FILE\Converter::MySQL;
$dbname = 'information_schema';
$host = 'localhost';
$username = 'root';
$password = '123';
// Create converter
$converter = new DB2FILE\Converter($driver, $dbname, $host, $username, $password);
// Print the XML file in text/xml format
||Applications that use this package
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.