PHP MySQL PDO class: Execute general purpose MySQL queries using PDO

Recommend this page to a friend!
  Info   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 794 All time: 4,242 This week: 287Up
Version License PHP version Categories
mysql-pdo 1.0.2GNU General Publi...5PHP 5, Databases
Description Author

This class can execute general purpose MySQL queries using PDO.

It can connect to a given MySQL database server using PDO and executes several types of SQL queries. Currently it can:

- Insert, update and delete table records with given values
- Execute arbitrary prepared queries
- Execute queries and return results in arrays or objects
- Get the last inserted table record identifier
- Check if a given table record exists with a given column value
- Disable foreign key check
- Get the average, sum, maximum or minimum value of a given table column
- Retrieve the column values of a given table
- Retrieve table records as key value-pair associative arrays
- Get a single value of a given table record
- Get a given table column list
- Get a given database tables list

Recommendations

same data, two tables.
i want my code to insert same ID no. to other table.

Picture of Anjan Bhowmik
Name: Anjan Bhowmik <contact>
Classes: 1 package by
Country: Bangladesh Bangladesh
Age: ???
All time rank: 260935 in Bangladesh Bangladesh
Week rank: 585 Up14 in Bangladesh Bangladesh Up

Details

MySqlPDO

A wrapper for MySQL PDO

Ths function provides wrapper for most used PDO functionalities, like: preparing and executing statements and fetching data.

Sample Data

Download sample employees data from: https://github.com/datacharmer/test_db/archive/master.zip

All queries in sample will be performed using that sample database. A trimmed down version of the database dump is also available inside here: examples/sql/employees.sql

  Files folder image Files  
File Role Description
Files folder imageexamples (2 files, 1 directory)
Plain text file class.MySqlPDO.php Class Class source
Accessible without login Plain text file LICENSE Data Auxiliary data
Accessible without login Plain text file README.md Data Auxiliary data

  Files folder image Files  /  examples  
File Role Description
Files folder imagesql (1 file)
  Accessible without login Plain text file config.php Example Example script
  Accessible without login Plain text file index.php Aux. Auxiliary script

  Files folder image Files  /  examples  /  sql  
File Role Description
  Accessible without login Plain text file employees.sql Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
 100%
Total:794
This week:0
All time:4,242
This week:287Up

For more information send a message to info at phpclasses dot org.