PHP Classes
elePHPant
Icontem

PHP Database Adapter class: Perform SQL database access operations using PDO

Recommend this page to a friend!
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2013-10-29 (2 years ago) RSS 2.0 feedStarStarStar 44%Total: 663 This week: 2All time: 4,597 This week: 629Up
Version License PHP version Categories
database-adapter 1.0Free For Educatio...5.2PHP 5, Databases
Description Author

This class can perform SQL database access operations using PDO.

It provides a general interface to access SQL databases using the PDO extension.

The class can establish connections, execute SQL queries composed using parameters, and retrieve results into arrays.

Picture of satyam kumawat
  Performance   Level  
Name: satyam kumawat is available for providing paid consulting. Contact satyam kumawat .
Classes: 1 package by
Country: India India
Age: 27
All time rank: 2701171 in India India
Week rank: 581 Up49 in India India Up

Details
 Version : 1.0
 Author  :  Satyam Kumawat <satyam2707@gmail.com>
 ===================================================

 This program is free package
 This program is distributed in the hope that it will be useful,
 This package is based on PHP AND PDO (PHP DATA OBJECT)

 Please Send your suggestion and feedback at satyam2707@gmail.com

=======================
 GENERAL INTRUCTIONS 
=======================

There are three files in this package.
1. DbAdapter.php (class contain all the functions for database operations)
2. DbAdapterInterface.php (Interface having function which should be defined in DbAdapter class. All the function are commented for better understanding)
3. demo.php (It is a demo file which which illustrate how to use this adaptor)


Below are the steps which supposed to be followed for better understanding.
---------------------------------------------------------------------------

1. Include Adaptor Class : <?php require_once 'DbAdapter.php';?>
	

2. Creating Adaptor Object :

	    <?php
    			$connection = array ('dsn'  =>'mysql:dbname=databasename;host=localhost', 
		        'username'  => 'root',
		        'password'     => '',
					   
				);
   		       $dbObj = new DbAdapter($connection);
	    ?>

3. Perform Your First Query :
  
   
  	<?php  //for single row
   		 $dbObj->select(array(*)) 
         	       ->from($table) 
                      ->fetch(); 

         //for All row
          $dbObj->select(array(*)) 
         	       ->from($table) 
                    ->fetchAll(); 

        ?>
4. Please follow demo.php file for all posible operations.

  Files folder image Files  
File Role Description
Accessible without login Plain text file Readme.txt Doc. Documentation File
Accessible without login Plain text file demo.php Example example script
Plain text file DbAdapterInterface.php Class Interface of adaptor
Plain text file DbAdapter.php Class Adaptor file

 Version Control Unique User Downloads Download Rankings  
 0%
Total:663
This week:2
All time:4,597
This week:629Up
User Ratings User Comments (1)
 All time
Utility:56%StarStarStar
Consistency:50%StarStarStar
Documentation:56%StarStarStar
Examples:56%StarStarStar
Tests:-
Videos:-
Overall:44%StarStarStar
Rank:2138