Login   Register  
PHP Classes
elePHPant
Icontem

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: 2013-01-11 04:54
Size: 972 bytes
 

Contents

Class file image Download
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)