sql

SQL library for using sql servers in phpBlamework.  Now is possible to use only mysql.  Release: $Name: $

Edit by: $Author: mcbig $ Edit Date: $Date: 2007/01/02 16:13:12 $ Version: $Revision: 1.3 $

Summary
SQL library for using sql servers in phpBlamework.
buffer for sql errors
add sql error to buffer SQL_Errors
Pop SQL_Errors buffer
Base SQL class, it’s contains only basic variables and definitions of common methods, which could be usable in others children.
Hostname or file or another server definition
this is for error encoding
Create simple SQLClass class.
Open conection with database
Close conection with database (or close file)
SQL Query
Class for MySQL conections base on SQLClass
returns what gets from mysql_query
class base on MySQLClass, constructor don’t neet params, cause it reads from SQL_server from config.php TODO: in future this class probably will be top of all SQLClasses (mysql, sqlite etc), technology will be using according to SQL_server.Type.
Returns Id of name, which finds in table.
return array of pair values Id => Name.

Variables

SQL_Errors

$GLOBALS['SQL_Errors']

buffer for sql errors

Functions

SQL_Error

function SQL_Error($isError)

add sql error to buffer SQL_Errors

PopSQL_Errors

function PopSQL_Errors()

Pop SQL_Errors buffer

SQLClass

Base SQL class, it’s contains only basic variables and definitions of common methods, which could be usable in others children.

Summary
Hostname or file or another server definition
this is for error encoding
Create simple SQLClass class.
Open conection with database
Close conection with database (or close file)
SQL Query

Variables

lsServer

var $lsServer

Hostname or file or another server definition

lsUser

var $lsUser

lsPass

var $lsPass

lsDatabase

var $lsDatabase

lpConnection

var $lpConnection

lsEncoding

var $lsEncoding

this is for error encoding

Functions

SQLClass

function SQLClass($isServer,
$isUser,
$isPass,
$isDatabase)

Create simple SQLClass class.

Open

function Open()

Open conection with database

Close

function Close()

Close conection with database (or close file)

Query

function Query()

SQL Query

MySQLClass

Class for MySQL conections base on SQLClass

Summary
returns what gets from mysql_query

Functions

MySQLClass

function MySQLClass($isServer,
$isUser,
$isPass,
$isDatabase)

Close

function Close()

Query

function Query($lsQuery)

returns what gets from mysql_query

MySQLConfig

class base on MySQLClass, constructor don’t neet params, cause it reads from SQL_server from config.php TODO: in future this class probably will be top of all SQLClasses (mysql, sqlite etc), technology will be using according to SQL_server.Type.

Functions

MySQLConfig

function MySQLConfig()

Combo functions

Summary
Returns Id of name, which finds in table.
return array of pair values Id => Name.

Functions

ComboName2Id

function ComboName2Id($ioSql,  
$isColId,  
$isTable,  
$isName,  
$isRow =  'Name')

Returns Id of name, which finds in table.

ioSQLSQLClass
isColIdid column name in table
isTabletable name
isNamename what we find
isRowname column name in table

ComboSelect

function ComboSelect($ioSql,  
$isColId,  
$isTable,  
$isRow =  'Name')

return array of pair values Id => Name.  This array is good for create combo boxs.

ioSQLSQLClass
isColIdid column name in table
isTabletable name
isRowname column name in table
$GLOBALS['SQL_Errors']
buffer for sql errors
function SQL_Error($isError)
add sql error to buffer SQL_Errors
function PopSQL_Errors()
Pop SQL_Errors buffer
var $lsServer
Hostname or file or another server definition
var $lsUser
var $lsPass
var $lsDatabase
var $lpConnection
var $lsEncoding
this is for error encoding
function SQLClass($isServer,
$isUser,
$isPass,
$isDatabase)
Create simple SQLClass class.
function Open()
Open conection with database
function Close()
Close conection with database (or close file)
function Query()
SQL Query
function MySQLClass($isServer,
$isUser,
$isPass,
$isDatabase)
function Close()
function Query($lsQuery)
returns what gets from mysql_query
$SQL_server
Configuration of SQL Server.
Template of config.php.
function MySQLConfig()
function ComboName2Id($ioSql,  
$isColId,  
$isTable,  
$isName,  
$isRow =  'Name')
Returns Id of name, which finds in table.
function ComboSelect($ioSql,  
$isColId,  
$isTable,  
$isRow =  'Name')
return array of pair values Id => Name.
Base SQL class, it’s contains only basic variables and definitions of common methods, which could be usable in others children.