PHP Classes

Database PDO Abstract Layer: Run queries with PDO and get results in XML, JSON

Recommend this page to a friend!
  Info   Screenshots Screenshots   View files View files (22)   DownloadInstall with Composer Download .zip   Reputation   Support forum (3)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-01-09 (1 month ago) RSS 2.0 feedStarStarStarStar 68%Total: 825 All time: 4,182 This week: 113Up
Version License PHP version Categories
database-pdo-class 2.29GNU General Publi...5.3PHP 5, Databases
Description 

Author

This class can run queries with PDO and get results in XML and JSON.

It can connect to a given database using the PDO extension and retrieves the results into arrays, objects, XML documents, CSV files or JSON strings.

The class supports prepared queries, transactions, stored procedures, etc..

Picture of Unay Santisteban
  Performance   Level  
Innovation award
Innovation award
Nominee: 2x

 

Recommendations

What is the best PHP database to xml class?
Output database results in XML

Details

OtherCode Database

Build Status Latest Stable Version License Total Downloads

Light database abstraction layer (PDO)

Currently supported:

  • MySQL
  • SQLite
  • Postgres

Installation

To install the package we only have to add the dependency to *composer.json* file:

"require": {
  "othercode/database": "*"
}

And run the following command:

composer update

Install without Composer

Also we can use this library without Composer, we only have to include in our script the "database/autoload.php" file.

require_once "database/autoload.php".

Configuration

Now we have to create the instance and add a new connection to it.

$db = new OtherCode\Database\Database();

$db->addConnection(array(
    'driver' => 'mysql',
    'host' => 'localhost',
    'dbname' => 'test',
    'username' => 'username',
    'password' => 'password'
));

Screenshots  
  • Example-result.png
  • Example.png
  Files folder image Files  
File Role Description
Files folder image.github (1 file)
Files folder imageexamples (2 files, 1 directory)
Files folder imagesrc (1 file, 3 directories)
Files folder imagetests (1 file)
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file autoload.php Aux. Auxiliary script
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. Licence
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Readme

 Version Control Reuses Unique User Downloads Download Rankings  
 91%1
Total:825
This week:0
All time:4,182
This week:113Up
 User Ratings  
 
 All time
Utility:100%StarStarStarStarStarStar
Consistency:87%StarStarStarStarStar
Documentation:-
Examples:93%StarStarStarStarStar
Tests:-
Videos:-
Overall:68%StarStarStarStar
Rank:451