PHP Classes

PHP OOP PDO Database Class Example: Demonstration of how to access databases using PDO

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 313 All time: 7,284 This week: 455Up
Version License PHP version Categories
oopregister 1.0.0The PHP License5PHP 5, Databases
Description 

Author

This class is a simple demonstration of how to access databases using PDO.

It shows how you can connect to a MySQL database server using PDO.

The class can also show how to insert a user record in database table using prepared queries, checking first if there is already a record for an user with the same user name or email address.

Picture of Dev Sharma
  Performance   Level  
Name: Dev Sharma <contact>
Classes: 4 packages by
Country: India India
Age: 22
All time rank: 3219210 in India India
Week rank: 214 Up11 in India India Up
Innovation award
Innovation award
Nominee: 2x

Recommendations

PDO Class
I need a class to connect to my db (mysql). Now my code is a old

  Files folder image Files (3)  
File Role Description
Plain text file class.user.php Class Class source
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file README.md Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:313
This week:0
All time:7,284
This week:455Up