Class: dbcon_mysql

Quellcode Position: Program_Root/db/mysql.php

Class dbcon_mysql

Class Overview
Inherited Properties And Methods
Inherited Properties Inherited Methods

Abgeleitet von dbcon_base

dbcon_base::$dbcon
dbcon_base::$lastquery
dbcon_base::$lastresult

Abgeleitet von base_object

base_object::$msgs

Abgeleitet von dbcon_base

dbcon_base::dbcon_base()
Constructor
dbcon_base::addField()
Add field
dbcon_base::addIndex()
Add index
dbcon_base::changeField()
Change field
dbcon_base::changeIndex()
Change index
dbcon_base::compareFieldStructure()
Compare the field structure
dbcon_base::compareKeyStructure()
Compare the key/index structure
dbcon_base::connect()
connect to Database
dbcon_base::createTable()
Create table
dbcon_base::deleteRecord()
delete database record
dbcon_base::deleteRecords()
delete database records
dbcon_base::dropField()
Delete field
dbcon_base::dropIndex()
Delete index
dbcon_base::getError()
Supply error
dbcon_base::getSQLCondition()
dbcon_base::getSQLSource()
DBMS spezific SQL source
dbcon_base::insertRecord()
Insert new record
dbcon_base::insertRecords()
Insert many records at once
dbcon_base::query()
Database request
dbcon_base::queryTableNames()
Get all table names
dbcon_base::queryTableStructure()
table structur as array
dbcon_base::updateRecord()
Change database record
dbcon_base::updateRecords()
Change database records

Abgeleitet von base_object

base_object::addmsg()
Adds a message in the message object.
base_object::createPluginObject()
Create plugin object
base_object::debug()
Show the debug of the variable &$var
base_object::encodeQueryString()
Encode query string
base_object::escapeForFilename()
Escape chars in a string to use it in a filename
base_object::getAbsoluteURL()
Return absolute URL
base_object::getBaseLink()
Get base link
base_object::getBasePath()
get base path to current script
base_object::getLink()
Get link
base_object::getSessionValue()
base_object::getWebLink()
Get web link
base_object::getWebMediaLink()
Get web media link
base_object::includePluginFile()
Include plugin file
base_object::initializeParams()
Parameter initialisation
base_object::initializeSessionParam()
Initialisation of session-parameter
base_object::logMsg()
Log events
base_object::parseRequestURI()
Parse request URI to filter data out of it
base_object::setSessionValue()
base_object::stripslashes()
base_object::_gt()
Phrasetranslator - Fetch translation for all phrase
base_object::_gtf()
Phrasetranslator - Fetch translation of one phrase and insert variable
base_object::_gtfile()
Phrases - Locate files

Method Summary
booblean   addField()   Add Field
boolean   addIndex()   Add index
booblean   changeField()   Change Field
boolean   changeIndex()   Change Index
void   compareFieldStructure()  
void   compareKeyStructure()  
resource   connect()   Establish connection to database
boolean   createTable()   Create given table
mixed   deleteRecord()   Delete record
mixed   deleteRecords()   Delete records by filter
booblean   dropField()   Drop field
boolean   dropIndex()   Drop Index
string   escapeStr()   String ecsaping for MySQL use
array   getError()   Provides error messages of last database connection
mixed   getExplain()   Return an explanation of the last SELECT-SQL-query
void   getSQLFunctionParams()  
mixed   getSQLSource()   DBMS spezific SQL source
mixed   insertRecord()   Insert record into table
void   insertRecords()  
mixed   &query()   Execute MySQL-query
array   queryTableNames()   Get table names
array   queryTableStructure()   Query table structure
mixed   updateRecord()   Update record
mixed   updateRecords()   Update records via filter

Properties
Methods
addField  [Zeile 576]

  booblean addField( string $table, array &$fielddata  )

Add Field

Parameters:
string   $table: 
array   &$fielddata: 

API Tags:
Access:  public

Neudefinition von:
dbcon_base::addField()
Add field

addIndex  [Zeile 650]

  boolean addIndex( table $table, array &$index  )

Add index

Parameters:
table   $table: 
array   &$index: 

API Tags:
Access:  public

Neudefinition von:
dbcon_base::addIndex()
Add index

changeField  [Zeile 591]

  booblean changeField( string $table, array &$fielddata  )

Change Field

Parameters:
string   $table: 
array   &$fielddata: 

API Tags:
Access:  public

Neudefinition von:
dbcon_base::changeField()
Change field

changeIndex  [Zeile 663]

  boolean changeIndex( atring $table, array &$index, [boolean $drop_current = true]  )

Change Index

Parameters:
atring   $table: 
array   &$index: 
boolean   $drop_current:  optional, default value true

API Tags:
Access:  public

Neudefinition von:
dbcon_base::changeIndex()
Change index

compareFieldStructure  [Zeile 747]

  void compareFieldStructure( mixed &$xmlfield, mixed &$dbfield  )


Neudefinition von:
dbcon_base::compareFieldStructure()
Compare the field structure

compareKeyStructure  [Zeile 762]

  void compareKeyStructure( mixed &$xmlkey, mixed &$dbkey  )


Neudefinition von:
dbcon_base::compareKeyStructure()
Compare the key/index structure

connect  [Zeile 26]

  resource connect( )

Establish connection to database


API Tags:
Return:  $this->dbcon connection ID

Neudefinition von:
dbcon_base::connect()
connect to Database

createTable  [Zeile 531]

  boolean createTable( string &$tabledata, string $tableprefix  )

Create given table

Parameters:
string   $tabledata: 
string   $tableprefix: 

API Tags:
Access:  public

Neudefinition von:
dbcon_base::createTable()
Create table

deleteRecord  [Zeile 283]

  mixed deleteRecord( string $table, string $idfield, array $value  )

Delete record

Parameters:
string   $table:  table name
string   $idfield:  primary key
array   $value:  primary key value

API Tags:
Return:  false or number of affected_rows or database result object

Neudefinition von:
dbcon_base::deleteRecord()
delete database record

deleteRecords  [Zeile 270]

  mixed deleteRecords( string $table, [string $filter = '1=1']  )

Delete records by filter

Parameters:
string   $table:  table name
string   $filter:  Filter string without WHERE condition

API Tags:
Return:  false or number of affected_rows or database result object

Neudefinition von:
dbcon_base::deleteRecords()
delete database records

dropField  [Zeile 637]

  booblean dropField( string $table, string $field  )

Drop field

Parameters:
string   $table: 
string   $field:  fieldname

API Tags:
Access:  public

Neudefinition von:
dbcon_base::dropField()
Delete field

dropIndex  [Zeile 706]

  boolean dropIndex( string $table, string $name  )

Drop Index

Parameters:
string   $table: 
string   $name: 

API Tags:
Access:  public

Neudefinition von:
dbcon_base::dropIndex()
Delete index

escapeStr  [Zeile 97]

  string escapeStr( string $str  )

String ecsaping for MySQL use

Parameters:
string   $str:  String, der Escaped werden soll.

API Tags:
Return:  String, der excaped wurde.


getError  [Zeile 51]

  array getError( )

Provides error messages of last database connection


API Tags:
Return:  error number, error message and last sql query

Neudefinition von:
dbcon_base::getError()
Supply error

getExplain  [Zeile 66]

  mixed getExplain( )

Return an explanation of the last SELECT-SQL-query

Explan the last query, number of lines etc.


API Tags:
Return:  Result or false, if last request wasn't a SELECT query


getSQLFunctionParams  [Zeile 715]

  void getSQLFunctionParams( mixed $params  )



getSQLSource  [Zeile 735]

  mixed getSQLSource( $function $function, $params $params  )

DBMS spezific SQL source

Parameters:
$function   $function:  sql function
$params   $params:  params

API Tags:
Return:  sql string or false
Access:  public

Neudefinition von:
dbcon_base::getSQLSource()
DBMS spezific SQL source

insertRecord  [Zeile 156]

  mixed insertRecord( string $table, string $idfield, [array $values = NULL]  )

Insert record into table

Parameters:
string   $table:  table
string   $idfield:  primary key value
array   $values:  insert values

API Tags:
Return:  false or Id of new record

Neudefinition von:
dbcon_base::insertRecord()
Insert new record

insertRecords  [Zeile 184]

  void insertRecords( mixed $table, mixed $values  )


Neudefinition von:
dbcon_base::insertRecords()
Insert many records at once

query  [Zeile 109]

  mixed &query( string $sql, [integer $max = NULL], [integer $offset = NULL]  )

Execute MySQL-query

Parameters:
string   $sql:  SQL-String with query
integer   $max:  maximum number of returned records
integer   $offset:  Offset

API Tags:
Return:  false or number of affected_rows or database result object

Neudefinition von:
dbcon_base::query()
Database request

queryTableNames  [Zeile 294]

  array queryTableNames( )

Get table names


API Tags:
Access:  public

Neudefinition von:
dbcon_base::queryTableNames()
Get all table names

queryTableStructure  [Zeile 492]

  array queryTableStructure( string $tablename, [string $tableprefix = '']  )

Query table structure

Parameters:
string   $tablename: 
string   $tableprefix:  optional, default value ''

API Tags:
Access:  public

Neudefinition von:
dbcon_base::queryTableStructure()
table structur as array

updateRecord  [Zeile 231]

  mixed updateRecord( string $table, array $values, string $idfield, array $value  )

Update record

Parameters:
string   $table:  table name
array   $values:  update values
string   $idfield:  primary key
array   $value:  primary key value

API Tags:
Return:  false or number of affected_rows or database result object

Neudefinition von:
dbcon_base::updateRecord()
Change database record

updateRecords  [Zeile 244]

  mixed updateRecords( string $table, array $values, [mixed $filter = '1=1']  )

Update records via filter

Parameters:
string   $table:  table name
array   $values:  update values
mixed   $filter:  Filter string without WHERE condition

API Tags:
Return:  false or number of affected_rows or database result object

Neudefinition von:
dbcon_base::updateRecords()
Change database records