PHP Classes

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    
Last Updated Ratings Unique User Downloads Download Rankings
2024-01-10 (3 months ago) RSS 2.0 feedStarStarStar 44%Total: 842 This week: 1All time: 4,123 This week: 80Up
Version License PHP version Categories
mysql-pdo 1.0.11GNU 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

Picture of Anjan Bhowmik
Name: Anjan Bhowmik <contact>
Classes: 1 package by
Country: Bangladesh Bangladesh
Age: ???
All time rank: 257732 in Bangladesh Bangladesh
Week rank: 83 Up2 in Bangladesh Bangladesh Up

Recommendations

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

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:842
This week:1
All time:4,123
This week:80Up
 User Ratings  
 
 All time
Utility:75%StarStarStarStar
Consistency:66%StarStarStarStar
Documentation:-
Examples:-
Tests:-
Videos:-
Overall:44%StarStarStar
Rank:3470