Class: base_db

Quellcode Position: Program_Root/sys_base_db.php

Class base_db

Class Overview
Direct Derivates
Abgeleitete Class Description
base_sitemap sitemap basic class
base_mimetypes Mime type data
base_filemanager basic class for file access
base_phrases Manage phrase class
base_phraseeditor basic class translation engine
base_options Basic options of papaya-cms
base_log Provides basic functionality for log messages
base_surfer Surfer object for load and check users
base_viewlist View list basic class
base_topiclist Create topic list
base_cronjobs Cronjob-administration
base_database2xml Export database structur as XML
papaya_parser Parser for special tags like papaya:media, papaya:link and papaya:popup
base_topic_tree Basic topic tree object
base_surferlinks Connect sufer permissions and page
base_urlmounter Edit URL basic class
base_topic Topic basic objekt
base_topic_navigation Basic object for topic navigation
papaya_editmodules Administration class for change modules
papaya_installer Install default database
papaya_modulemanager Administration Papaya-Module
base_auth User autentification
base_boxes Manage action boxes
base_boxeslist Deliver list of boxes
base_boxeslinks Link Box with page
base_messages message service

Inherited Properties And Methods
Inherited Properties Inherited Methods

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

Properties Summary
string   $dbobj_name   Prefix of the global variable
string   $dbsocket   Connection via Socket - data about Sockets, only MySQL
string   $dburi   Database URI
$db_obj   $db_obj   Reference to connection object
base_errors   $msgs   Message for user

Method Summary
boolean   createDBObject()   Create data base object(PEAR)
boolean   db_addField()   Interface function: insert field
boolean   db_addIndex()   Interface function: insert index
boolean   db_changeField()   Interface function: change field
boolean   db_changeIndex()   Interface function: change index
boolean   db_connect()   Connect to data base object
boolean   db_createTable()   Interface function: create given table
mixed   db_deleteRecord()   Interface function: delete database record
mixed   db_deleteRecords()   Interface function: delete records
boolean   db_dropField()   Interface function: delete field
boolean   db_dropIndex()   Interface function: delete index
mixed   db_emptyTable()   Interface function: delete ALL data in this table
mixed   db_getSQLSource()   DBMS spezific SQL source
mixed   db_insertRecord()   Interface function: create new record, return ID, set default values
booolean   db_insertRecords()   Interface function: insert records
mixed   db_query()   Interface function: submit database query
mixed   db_queryFmt()   Interface function: escape params and submit query
array   db_queryTableNames()   Interface function: delete all table names
array   db_queryTableStructure()   Interface function: table structur returned as array
mixed   db_updateRecord()   Interface function: change data record
mixed   db_updateRecords()   Interface function: change data records
string   escapeStr()   Store string in sql for use

Properties
Methods
createDBObject  [Zeile 87]

  boolean createDBObject( integer $obj_no  )

Create data base object(PEAR)

Parameters:
integer   $obj_no:  Suffix für globale Variable


db_addField  [Zeile 299]

  boolean db_addField( string $table, array &$fielddata  )

Interface function: insert field

Parameters:
string   $table: 
array   &$fielddata: 

API Tags:
Access:  public


db_addIndex  [Zeile 344]

  boolean db_addIndex( string $table, array &$index  )

Interface function: insert index

Parameters:
string   $table: 
array   &$index: 

API Tags:
Access:  public


db_changeField  [Zeile 314]

  boolean db_changeField( string $table, array &$fielddata  )

Interface function: change field

Parameters:
string   $table: 
array   &$fielddata: 

API Tags:
Access:  public


db_changeIndex  [Zeile 359]

  boolean db_changeIndex( string $table, array &$index  )

Interface function: change index

Parameters:
string   $table: 
array   &$index: 

API Tags:
Access:  public


db_connect  [Zeile 63]

  boolean db_connect( [integer $obj_no = 0]  )

Connect to data base object

Parameters:
integer   $obj_no:  Suffix(Zähler) für globale Variable


db_createTable  [Zeile 284]

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

Interface function: create given table

Parameters:
string   &$tabledata: 
string   $tableprefix: 

API Tags:
Access:  public


db_deleteRecord  [Zeile 217]

  mixed db_deleteRecord( string $table, string $idfield, string $value  )

Interface function: delete database record

Parameters:
string   $table:  table
string   $idfield:  Index column
string   $value:  index

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


db_deleteRecords  [Zeile 231]

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

Interface function: delete records

Parameters:
string   $table:  table
string   $filter:  conditions

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


db_dropField  [Zeile 329]

  boolean db_dropField( string $table, string $field  )

Interface function: delete field

Parameters:
string   $table: 
string   $field: 

API Tags:
Access:  public


db_dropIndex  [Zeile 374]

  boolean db_dropIndex( string $table, string $name  )

Interface function: delete index

Parameters:
string   $table: 
string   $name: 

API Tags:
Access:  public


db_emptyTable  [Zeile 244]

  mixed db_emptyTable( string $table  )

Interface function: delete ALL data in this table

Parameters:
string   $table:  table

API Tags:
Return:  deleted record count or false


db_getSQLSource  [Zeile 390]

  mixed db_getSQLSource( $function $function  )

DBMS spezific SQL source

db_getSQLSource(function, param1, escaping, param2, escaping, ...)

Parameters:
$function   $function:  sql function

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


db_insertRecord  [Zeile 157]

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

Interface function: create new record, return ID, set default values

Parameters:
string   $table:  table
mixed   $idfield:  field with ID (or NULL)
array   $values:  default values

API Tags:
Return:  false or Id of new record


db_insertRecords  [Zeile 171]

  booolean db_insertRecords( string $table, array $values  )

Interface function: insert records

Parameters:
string   $table:  table
array   $values:  default values


db_query  [Zeile 121]

  mixed db_query( string $sql, [mixed $max = NULL], [mixed $offset = NULL]  )

Interface function: submit database query

Parameters:
string   $sql: 

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


db_queryFmt  [Zeile 137]

  mixed db_queryFmt( string $sql, array $vals, [integer $max = NULL], [integer $offset = NULL]  )

Interface function: escape params and submit query

Parameters:
string   $sql:  SQL-String
array   $vals:  values
integer   $max:  maximum number returned data sets
integer   $offset:  Offset

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


db_queryTableNames  [Zeile 254]

  array db_queryTableNames( )

Interface function: delete all table names


API Tags:
Access:  public


db_queryTableStructure  [Zeile 269]

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

Interface function: table structur returned as array

Parameters:
string   $tablename:  tablename
string   $tableprefix:  Prefix

API Tags:
Access:  public


db_updateRecord  [Zeile 187]

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

Interface function: change data record

Parameters:
string   $table:  table
array   $values:  default value
string   $idfield:  index column
string   $value:  index

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


db_updateRecords  [Zeile 202]

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

Interface function: change data records

Parameters:
string   $table:  table
array   $values:  default values
string   $filter:  conditions

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


escapeStr  [Zeile 107]

  string escapeStr( string $str  )

Store string in sql for use

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