Download the PHP package stefangabos/zebra_database without Composer
On this page you can find all versions of the php package stefangabos/zebra_database. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download stefangabos/zebra_database
More information about stefangabos/zebra_database
Files in stefangabos/zebra_database
Package zebra_database
Short Description An advanced, compact and lightweight MySQL database wrapper library, built around PHP's MySQLi extension.
License LGPL-3.0-or-later
Homepage https://github.com/stefangabos/Zebra_Database
Informations about the package zebra_database
Zebra Database
A compact, lightweight yet feature-rich PHP MySQLi database wrapper providing methods for interacting with MySQL databases that are more secure, powerful and intuitive than PHP's default ones.
Zebra_Database supports transactions and provides ways for caching query results either by saving cached data to the disk, in the session, by using memcache or redis.
The library provides a comprehensive debugging interface with detailed information about the executed queries: execution time, returned/affected rows, excerpts of the found rows, error messages, backtrace information, etc. It can also automatically EXPLAIN SELECT queries (so you don't miss those keys again!).
Can provides debugging information when called from CLI (command-line interface) and supports logging queries done through AJAX requests.
It encourages developers to write maintainable code and provides a better default security layer by encouraging the use of prepared statements, where parameters are automatically escaped.
The code is heavily commented and generates no warnings/errors/notices when PHP's error reporting level is set to E_ALL.
:microscope: See the debugging console in action
Features
-
it uses the mysqli extension extension for communicating with the database instead of the old mysql extension, which is officially deprecated as of PHP v5.5.0 and will be removed in the future; this is not a wrapper for the PDO extension which is already a wrapper in itself!
-
can provide debugging information even when called from CLI (command-line interface)
-
logs all queries, including those run through AJAX
-
offers lots of powerful methods for easier interaction with MySQL
-
supports unbuffered queries
-
provides a better security layer by encouraging the use of prepared statements, where parameters are automatically escaped
-
provides a very detailed debugging interface with lots of useful information about executed queries; it also automatically EXPLAINs each SELECT query
-
supports caching of query results to the disk, in the session, or to a memcache or to a redis server
- code is heavily commented and generates no warnings/errors/notices when PHP's error reporting level is set to E_ALL
:notebook_with_decorative_cover: Documentation
Check out the awesome documentation!
🎂 Support the development of this project
Your support is greatly appreciated and it keeps me motivated continue working on open source projects. If you enjoy this project please star it by clicking on the star button at the top of the page. If you're feeling generous, you can also buy me a coffee through PayPal or become a sponsor. Thank you for your support! 🎉
Requirements
PHP 5.4.0+ with the mysqli extension activated, MySQL 4.1.22+
For using memcache as caching method, PHP must be compiled with the memcache extension and, if memcache_compressed property is set to TRUE, needs to be configured with –with-zlib[=DIR]
For using redis as caching method, PHP must be compiled with the redis extension and, if redis_compressed property is set to TRUE, needs to be configured with –with-zlib[=DIR]
Installation
You can install Zebra Database via Composer
Or you can install it manually by downloading the latest version, unpacking it, and then including it in your project
How to use
Connecting to a database
Running queries
An INSERT statement
An UPDATE statement
There are over 40 methods and 20 properties that you can use and lots of things you can do with this library. I've prepared an awesome documentation so that you can easily get an overview of what can be done. Go ahead, check it out!