Zebra_Database是一个高级,紧凑(只有一个文件),轻量级,面向对象的MySQL数据库操作封装。基于PHP的 MySQL扩展。它提供">访问数据库的方法比PHP默认更加简单和直观。此外,它还提供调试控制台来查看SQL的执行情况。提供了各种用于与 MySQL 数据库交互的直观方法,比 PHP 自带的更有趣。
Zebra_Database it is an advanced, compact (one-file only), lightweight, object-oriented MySQL database wrapper built upon PHP’s MySQL extension. It provides methods for interacting with MySQL databases that are more intuitive and fun to use than PHP’s default ones.
The class provides a comprehensive debugging interface with detailed information about the executed queries: execution time, returned/affected rows, excerpts of the found rows, error messages, etc. It also automatically EXPLAIN‘s each SELECT query (so you don’t miss those keys again!).
It encourages developers to write maintainable code and provides a better default security layer by automatically escaping strings.
Zebra_Database‘s code is heavily commented and generates no warnings/errors/notices when PHP’s error reporting level is set to E_ALL.
In version 2.2 a bug was fixed where the "select" method war returning a boolean value rather than a resource (thanks to Monil); the class now uses "lazy connection" meaning that it will not actually connect to the database until the first query is run; the debug console now shows also session variables; the "showdebugconsole" method can now be instructed to return output rather than print it to the screen; the highlighter now highlights more keywords; improved documentation for the "connect" method.
更新日志:
·fixed a bug where the “select” method war returning a boolean value rather than a resource (thanks to Monil);
·the class now uses “lazy connection” meaning that it will not actually connect to the database until the first query is run;
·the debug console now shows also session variables;
·the “show_debug_console” method can now be instructed to return output rather than print it to the screen;
·the highlighter now highlights more keywords;
·improved documentation for the “connect” method;
下载地址:http://stefangabos.ro/wp-content/uploads/2011/01/zebra_database.2.2.zip