Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vodolaz095/multidbq
MultiDBq - singleton-styled MySQL wrapper class with build in profiler, connections to multiple hosts and easy configuration
https://github.com/vodolaz095/multidbq
Last synced: about 4 hours ago
JSON representation
MultiDBq - singleton-styled MySQL wrapper class with build in profiler, connections to multiple hosts and easy configuration
- Host: GitHub
- URL: https://github.com/vodolaz095/multidbq
- Owner: vodolaz095
- Created: 2012-05-16T19:47:04.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-08-13T14:01:43.000Z (over 12 years ago)
- Last Synced: 2024-04-09T23:07:24.660Z (7 months ago)
- Language: PHP
- Size: 121 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
MultiDBq
========MultiDBq - singleton-styled MySQL wrapper class with build in profiler,
connections to multiple hosts and easy configuration### Main Features
1. Singleton asssembly of class - low memory consumption, easy to access class from every scope of view
2. Easy to set multiple mysql-links
3. Buildin profiler - link,query, execution time et cetera...
4. Class automaticaly chooses the best mysql database driver from installed extensions (at least best in my opinion :-))### Requiraments
PHP > 5.3, php_mysql, php_pdo mods installed... MySQL server
### Sample```php
true),'`id`="'.$user['id'].'"');
DB::setLink('log');
DB::insert('iplog',array('login'=>$user['Login'],'timestamp'=>time(),'result'=>'ok'));
DB::setLink('main');
return $user;
}
else
{
return false;
}
}/*
a lot of code
*/
$users_online=DB::q('SELECT * FROM `users` WHERE `online`=1');foreach($users_online as $user_online)
{
echo 'User'.$user_online['Login'].' is online!
';
}if(defined('DEBUG')) print_r(DB::s());
?>
```## About
Copyright © 2003-2012 [Anatoly Ostroumov](http://teksi.ru/webdev)
## License
Licensed under the [ISC License](http://www.opensource.org/licenses/ISC).
Copyright (c) 2003-2012 Anatoly Ostroumov
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.