https://github.com/cryptiklemur/connectionmanager
Quick Connection Manager for writing fast scripts
https://github.com/cryptiklemur/connectionmanager
Last synced: 5 months ago
JSON representation
Quick Connection Manager for writing fast scripts
- Host: GitHub
- URL: https://github.com/cryptiklemur/connectionmanager
- Owner: cryptiklemur
- Created: 2013-03-08T23:38:08.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-03-14T20:40:14.000Z (over 13 years ago)
- Last Synced: 2025-07-12T06:37:13.082Z (11 months ago)
- Language: PHP
- Size: 105 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Connection Manager
=========================
Install:
--------
To Install this, just run the shell code below.
```sh
git clone git@github.com:aequasi/ConnectionManager.git
cd ConnectionManager
composer install
```
OR, if you are using composer
```sh
composer require aequasi/connection-manager dev-master
```
In your php file, add this at the top, changing the path to wherever it belongs
```php
// If you arent using composer in your global project, make sure you use the autoloader
require_once( __DIR__ . '/ConnectionManager/vendor/autoload.php' );
use Aequasi\ConnectionManager;
```
Then, make a yml config file (placing it wherever you need) that looks like `ConnectionManager/src/Aequasi/ConnectionManager/Resources/config/connection.yml`
Use:
----
In your code, that has the required above, follow this example:
```php
ConnectionManager::$config = $customConfigFilename;
$classDb = ConnectionManager::getConnection( 'classdb', 'someuser', 'somepassword' );
$result = $classDb->executeQuery( $query )->fetchAll();
```