PHP Classes

DB Manager: Execute common SQL queries to a MySQL database

Recommend this page to a friend!
  Info   View files Example   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 224 All time: 8,207 This week: 149Up
Version License PHP version Categories
db_manager 1.0.1Custom (specified...5PHP 5, Databases


This class can execute common SQL queries to a MySQL database.

It can connect to a MySQL database and execute arbitrary queries or queries composed programatically from parameter values.

Currently it can execute SELECT queries to a given table, INSERT queries from a list of fields and values, and UPDATE or DELETE queries to table records matching a condition.

Picture of Kabir Hossain
  Performance   Level  
Name: Kabir Hossain <contact>
Classes: 3 packages by
Country: Bangladesh Bangladesh
Age: ???
All time rank: 384747 in Bangladesh Bangladesh
Week rank: 344 Up7 in Bangladesh Bangladesh Up


$db = new Database('localhost','root','','db_example');
//insert example
$data = array(
'name' => 'Demo Insert',
'role' => 'Editor'
//for getting insert id
        //echo $db->insertData($table='users',$data)->insertId();
    //select example
$select_data = $db->selectData($table='users', $select='id,name,role', $where=null, $or_where=null, $orderby='id', $limit=10, $offset=null);
//update example
$data = array(
'name' => 'Demo Update',
'role' => 'Editor'
$where = 'id=4';// using string
        //$where = array('id'=>4);//using array

//delete example
$where = array('id'=>4,'status'=>0);//using array
        //$where = 'id=5 AND status=0';// using string



This class can query MySQL databases using SQL.

It can establish a connection to a MySQL server and execute SQL queries to the database tables.

The class can execute SQL SELECT, INSERT, UPDATE and DELETE queries from parameters that specify the tables, the fields and its values.

You can give parameter as a string or array.

  Files folder image Files  
File Role Description
Plain text file Database.php Class Class source
Accessible without login Plain text file db_example.sql Data Auxiliary data
Accessible without login Plain text file example.php Example Example script
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file Doc. Documentation

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:8,207
This week:149Up