CaMykS  1.0-20181201
 All Classes Files Functions Variables Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CDBConnection Class Reference
Inheritance diagram for CDBConnection:
Inheritance graph
[legend]

Public Member Functions

 __construct ()
 
 connect_server ($host='localhost', $login='', $pwd='', $driver='')
 
 disconnect_server ()
 
 is_connectionActive ()
 
 check_status ($name)
 
 get_serverVersion ()
 
 select_database ($name)
 
 create_database ($name, $charset='utf8')
 
 database_exists ($name)
 
 dump_database ($file=false)
 
 get_databaseSize ()
 
 get_databaseSummary ()
 
 get_tableList ()
 
 create_table ($name, $fields, $charset='utf8', $autoId=true, $primaryKeys=array('id'))
 
 execute_query ($sql='', $resName='defaultRes')
 
 get_queryGeneratedId ($resName='defaultRes')
 
 get_queryDataLine ($resName='defaultRes')
 
 get_queryNumDataLine ($resName='defaultRes')
 
 get_queryError ($resName='defaultRes')
 
 get_queryAffectedRows ($resName='defaultRes')
 
 get_queryFieldCount ($resName='defaultRes')
 
 get_queryFieldType ($fIndex=0, $resName='defaultRes')
 
 close_ressource ($resName='defaultRes')
 
 escape_string ($string)
 
 get_insertExtra ()
 

Protected Member Functions

 get_resName ()
 

Protected Attributes

 $active = false
 CDBConnection status. More...
 
 $connection = null
 CDBConnection database ressource. More...
 
 $queryRes = array()
 Query ressources. More...
 
 $dbName = null
 Name of the database. More...
 

Detailed Description

CDBConnection class.

Author
CaMykS Team camyk.nosp@m.s.co.nosp@m.ntact.nosp@m.@gma.nosp@m.il.co.nosp@m.m

Constructor & Destructor Documentation

CDBConnection::__construct ( )

Class constructor.

Returns
void

Member Function Documentation

CDBConnection::check_status (   $name)

Check database status.

Parameters
string$name
Returns
array
CDBConnection::close_ressource (   $resName = 'defaultRes')
abstract

Close ressource.

Parameters
string$resName
Returns
boolean result
CDBConnection::connect_server (   $host = 'localhost',
  $login = '',
  $pwd = '',
  $driver = '' 
)
abstract

Connect to server.

Parameters
string$host
string$login
string$pwd
string$driver
Returns
boolean success
CDBConnection::create_database (   $name,
  $charset = 'utf8' 
)
abstract

Create a database.

Parameters
string$name
string$charset
Returns
boolean
CDBConnection::create_table (   $name,
  $fields,
  $charset = 'utf8',
  $autoId = true,
  $primaryKeys = array('id') 
)
abstract

Create a table in the database.

Parameters
string$name
array$fields
string$charset
boolean$autoId
array$primaryKeys
Returns
boolean success
CDBConnection::database_exists (   $name)
abstract

Check if a base exists.

Parameters
string$name
Returns
boolean
CDBConnection::disconnect_server ( )
abstract

Close server connection.

Returns
boolean success
CDBConnection::dump_database (   $file = false)
abstract

Dump database.

Parameters
mixed$file
Returns
mixed
CDBConnection::escape_string (   $string)

Return escaped string.

Parameters
string$string
Returns
string
CDBConnection::execute_query (   $sql = '',
  $resName = 'defaultRes' 
)
abstract

Execute query.

Parameters
string$sql
string$resName
Returns
boolean success
CDBConnection::get_databaseSize ( )
abstract

Return database size.

Returns
integer
CDBConnection::get_databaseSummary ( )
abstract

Return database information summary.

Returns
array
CDBConnection::get_insertExtra ( )

Return specific insert extra from driver.

Returns
string
CDBConnection::get_queryAffectedRows (   $resName = 'defaultRes')
abstract

Return latest query affected rows.

Parameters
string$resName
Returns
integer
CDBConnection::get_queryDataLine (   $resName = 'defaultRes')
abstract

Return next query data line.

Parameters
string$resName
Returns
array
CDBConnection::get_queryError (   $resName = 'defaultRes')
abstract

Return latest query error.

Parameters
string$resName
Returns
string
CDBConnection::get_queryFieldCount (   $resName = 'defaultRes')
abstract

Return latest query field count.

Parameters
string$resName
Returns
integer
CDBConnection::get_queryFieldType (   $fIndex = 0,
  $resName = 'defaultRes' 
)
abstract

Return latest query field type.

Parameters
integer$fIndex
string$resName
Returns
string
CDBConnection::get_queryGeneratedId (   $resName = 'defaultRes')
abstract

Return id generated by last query.

Parameters
string$resName
Returns
integer
CDBConnection::get_queryNumDataLine (   $resName = 'defaultRes')
abstract

Return next query data line with numeric indexes.

Parameters
string$resName
Returns
array
CDBConnection::get_resName ( )
protected

Return automatic ressource name.

Returns
string
CDBConnection::get_serverVersion ( )
abstract

Return database engine version.

Returns
string
CDBConnection::get_tableList ( )
abstract

Return available table list.

Returns
array
CDBConnection::is_connectionActive ( )

Check if connection is active.

Returns
boolean success
CDBConnection::select_database (   $name)
abstract

Select database.

Parameters
string$name
Returns
boolean

Member Data Documentation

boolean CDBConnection::$active = false
protected

CDBConnection status.

Ressource CDBConnection::$connection = null
protected

CDBConnection database ressource.

string CDBConnection::$dbName = null
protected

Name of the database.

array CDBConnection::$queryRes = array()
protected

Query ressources.


The documentation for this class was generated from the following file: