devtoolboxuk / storage
Storage
Installs: 5 691
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- doctrine/dbal: 2.5.13
Requires (Dev)
README
Table of Contents
Background
Can be used to connect to storage engines such as MySQL
Usage
Usage of the hashing service
$ composer require devtoolboxuk/storage
Then include Composer's generated vendor/autoload.php to enable autoloading:
require 'vendor/autoload.php';
MySQL Connection
Basic example of accessing a database
use devtoolboxuk/storage; $dbOptions = [ 'adapter' => 'mysql', 'driver' => 'mysqli', 'host' => '', 'dbname' => '', 'user' => '', 'password' => '', 'port' => '3306', 'charset' => 'utf8 ]; $storage = new StorageManager($dbOptions); $conn = $storage->getAdapter()->connection(); $queryBuilder = $conn->createQueryBuilder(); $result = $queryBuilder ->select('id', 'name') ->from('users') ->execute(); print_r($result->fetchAll());
Maintainers
License
MIT © DevToolboxUK