Login   Register  
PHP Classes

File: readme.txt

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of ZLioxygon  >  Minimalistic DB  >  readme.txt  >  Download  
File: readme.txt
Role: Documentation
Content type: text/plain
Description: Readme
Class: Minimalistic DB
Database abstraction layer with minimal interface
Author: By
Last change: Reedit text
Date: 2 years ago
Size: 972 bytes


Class file image Download
Minimalistic class for work with DB through factory-function.
Simple use. Short name of methods.

	object db(null|array|string) - factory-function
		JSON-encoded string
		path to file (JSON-encoded)
		NULL if used 'db_config'
		TRUE (or resend options) reconnect to DB 
		object instance

	bool function o() - status connection
	bool|array q(string) - request to DB
			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)