PHP Classes
elePHPant
Icontem

DaoOne: Access MySQL databases using the MySQLi extension

Recommend this page to a friend!
  Info   View files Example   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2018-06-09 (6 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 103 This week: 1All time: 9,039 This week: 289Up
Version License PHP version Categories
daoone 1.0MIT/X Consortium ...5PHP 5, Databases
Description Author

This class can access MySQL databases using the MySQLi extension.

It can connect to a MySQL database and execute SQL queries with the MySQLi extension.

The class provides several types of functions to run and process queries like:

- Prepare and execute arbitrary SQL queries
- Run multiple queries at once
- Manage transactions
- Get the last inserted record identifier
- Get the last error message
- Convert time and date values between different formats
- Log executed queries to a file

The class has a read-only mode that prevents it to execute SQL queries that would modify the database.

  Performance   Level  
Name: Jorge Castro <contact>
Classes: 7 packages by
Country: Chile Chile
Age: 42
All time rank: 254710 in Chile Chile
Week rank: 10 Up1 in Chile Chile Up
Innovation award
Innovation award
Nominee: 4x

Winner: 1x

Details

DaoOne

Database Access Object wrapper for PHP and MySqli in a single class

It's a simple wrapper for Mysqli

Install (using composer)

Add to composer.json the next requirement, then update composer.

  {
      "require": {
        "eftec/daoone": "2.*"
      }
  }

Install (manually)

Just download the file lib/DaoOne.php and save it in a folder.

Usage

Start a connection

$dao=new DaoOne("127.0.0.1","root","abc.123","sakila","");
$dao->connect();

where 127.0.0.1 is the server where is the database. root is the user abc.123 is the password of the user root. sakila is the database used. "" (optional) it could be a log file, such as c:\temp\log.txt

  Files folder image Files  
File Role Description
Files folder imagelib (1 file)
Files folder imagetest (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

  Files folder image Files  /  lib  
File Role Description
  Plain text file DaoOne.php Class Class source

  Files folder image Files  /  test  
File Role Description
  Accessible without login Plain text file testdb.php Example Example script

 Version Control Unique User Downloads Download Rankings  
 100%
Total:103
This week:1
All time:9,039
This week:289Up