Wrapper for PHP mysql extension
, (*1)
The mysql-wrapper api support mysql extension api, and was designed to work best as with mysql extension.
If you have PHP7 environment and must need mysql extension api, this is good choise., (*2)
License
BSD 2-clause, (*3)
Requirements
- This wrapper api requires mysqli extension on PHP 4.1 and after
- check with is_resource() about mysql link and mysql result, replace is_myresource() api. For example:
Example
user, $row->host);
}
mysql_free_result($result);
mysql_close($con);
?>
Composer
first, make composer.json as follow:, (*4)
{
"require": {
"joungkyun/mysql-extension-wrapper": "1.0.*"
}
}
and, install mysql-extension-wrapper, (*5)
[user@host project]$ php composer.phpt install
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing joungkyun/mysql-extension-wrapper (1.0.1): Downloading (100%)
Writing lock file
Generating autoload files
[user@host project]$
and, write code as follow:, (*6)
Credits
JoungKyun.Kim, (*7)