Recommend this page to a friend! |
Download .zip |
Info | View files (6) | Download .zip | Reputation | Support forum (2) | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2013-01-11 (3 years ago) | Not yet rated by the users | Total: 449 | All time: 5,876 This week: 1,081 |
Version | License | PHP version | Categories | |||
minimalistic-db 2.0 | GNU General Publi... | 5 | PHP 5, Databases |
Description | Author | |
This package is a database abstraction layer with minimal interface. |
Minimalistic class for work with DB through factory-function. Simple use. Short name of methods. Main: object db(null|array|string) - factory-function accept: array JSON-encoded string path to file (JSON-encoded) NULL if used 'db_config' TRUE (or resend options) reconnect to DB return: object instance Methods: bool function o() - status connection bool|array q(string) - request to DB return: array - [data] TRUE - Ok FALSE - throw Exception string function s(string) - safe input data (real escape string) bool function c(string) - choice of encoding (collate) int function f() - return number of fields in result from last query (SELECT) int function r() - return number of rows in result from last query (SELECT) or affected records (INSERT, UPDATE, DELETE) int function l() - return last insert id int function i() - return counter (number of queries) int function t() - return timer (total work time) |
Files |
File | Role | Description | ||
---|---|---|---|---|
classes (2 files) | ||||
db.php | Class | Main PHP file | ||
db_config.json | Data | DB config JSON-encoded file | ||
examples.php | Example | Examples | ||
readme.txt | Doc. | Readme |
Files | / | classes |
File | Role | Description |
---|---|---|
db_config.class.php | Class | DB connect configuration |
db_mysql.class.php | Class | Extended class |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
0% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.