PHP Classes

PHP MySQL DBI: Access MySQL databases using the MySQLi extension

Recommend this page to a friend!
  Info   Documentation   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: 116 All time: 9,561 This week: 455Up
Version License PHP version Categories
dbi-mysql 1.0Custom (specified...5PHP 5, Databases
Description 

Author

This class can access MySQL databases using the MySQLi extension.

It provides static functions and variables to connect to a MySQL server using the PHP MySQLi extension.

The database connection parameters can be defined using a static class array variable.

The class can also execute SQL queries and retrieve query results that it returns as arrays.

Picture of Alex McArrow
  Performance   Level  
Innovation award
Innovation award
Nominee: 2x

Winner: 1x

 

Documentation

DB - MySQL(i) class

Init

$DSN = array (
    'host'=>'localhost',
	'base'=>'dbname',
	'user'=>'user',
	'pass'=>'password',
	'char'=>'utf-8'
);
new \DBI\MySQL ($DSN);

Use

\DBI\MySQL::query ("SELECT 1;");

  Files folder image Files (4)  
File Role Description
Files folder imageDBI (1 file)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
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:116
This week:0
All time:9,561
This week:455Up