Class DbConnexion

Description

The object to make request and be connected to the databases

  • author: SimpliciWeb
  • version: $Id: dbconnexion.class.php 872 2008-01-31 16:09:33Z stephanet $

Located in /core/internal_components/common/database/dbconnexion.class.php (line 74)

ObjectCached
   |
   --DbConnexion
Variable Summary
Method Summary
 bool connectToDB (string $p_db,  &$r_id_connect, resource $r_id_connect)
 bool execute_multiplerequest (string $sql_to_play)
 bool formatAndProtectRequest ( &$r_table_params,  &$p_request, array $r_table_params, string $p_request)
 bool getConnection ( &$r_super_admin_sql_connection_id,  &$r_sql_connection_information, string $p_database, resource $r_super_admin_sql_connection_id, resource $r_sql_connection_information)
 bool getConnectionInfo ( &$r_db_name,  &$r_user_name,  &$r_user_pass, string $r_db_name, string $r_user_name, string $r_user_pass)
 string getCurrentSiteName ()
 bool getWebsiteGroupMaster ( &$r_result, string $dbc_dbname, string $r_result)
 bool makeSqlQuery (string $p_request,  &$r_table_params,  &$r_result_set, [string $p_database_selected = ""], array $r_table_params, resource $r_result_set)
 bool makeSqlQueryAdminSuper (string $p_request,  &$r_table_params,  &$r_result_set, array $r_table_params, resource $r_result_set)
 bool makeSqlQueryWithId (string $p_request,  &$r_table_params,  &$r_result_set,  &$r_insert_id, array $r_table_params, resource $r_result_set, integer $r_insert_id)
 bool mustWeCheckWebsiteMasterGroup (string $p_table, [string $p_field = null])
 bool tableExist (string $p_table_name)
 string translate (string $p_type, string $p_data)
 bool xGetWebsiteGroups ( &$r_result, array $r_result)
 bool xGetWebsiteSlave ( &$r_result, string $p_dbc_dbname, array $r_result)
Variables
bool $debug_is_on = false (line 167)

Active this var to debug any request

array $HTML_ENTITIES_REVERSED = array() (line 213)
array $HTML_SPECIALCHARS_REVERSED = array() (line 209)
string $m_database_host = "" (line 192)

Database host

string $m_database_inherited_sitename = "" (line 103)

Inherited site name

bool $m_database_is_ecommerce_web_site = false (line 123)

Is ecommerce website

string $m_database_name = NULL (line 174)

Database name

string $m_database_user_name = NULL (line 180)

Database user

string $m_database_user_pass = NULL (line 186)

Database pass

bool $m_debug_connectivity = FALSE (line 225)

Active this var to debug connectivity

resource $m_id_sql = NULL (line 87)

The id for current web site

resource $m_id_sql_admin_super = NULL (line 81)

The id for admin super

resource $m_last_connection_sql_id = NULL (line 97)
array $m_master_website_group_table = array() (line 110)

Store list of table use in master

array $m_master_website_group_table_and_field = array() (line 116)

Store list of fields use in master

array $m_not_destroying_cache = array() (line 205)

table not destroying cache

string $m_site_name = NULL (line 93)

Current site name

array $m_supported_tags = array() (line 199)

Supproted tags

array $m_website_group = array() (line 130)

Get website group

string $req_get_websitegroup =
"SELECT dbc_dbname, dbc_group
FROM databaseconnect
WHERE dbc_dblogin<>'ALIAS'
ORDER BY dbc_dbname ;"
(line 137)

SQL Request : Get web site group

string $req_lock_table = "
LOCK TABLES t_address READ, t_attribut READ, t_attributvalue READ, t_area_has_t_deliverycosts_type READ,
t_country READ, t_customer_has_t_productmaster WRITE, t_deliverycosts_type READ,
t_globalscope READ, t_lang READ, t_payment_method READ, t_payment_method_special READ,
t_productmaster READ, t_productslave WRITE, t_productmodifier READ,
t_order WRITE, t_orderdetail WRITE, t_order_id WRITE,
t_setting READ, t_shoppingcart WRITE, t_text READ, t_text_field READ, t_text_field_bbcode READ, t_tvatype WRITE ;"
(line 147)

SQL Request : Lock tables

string $req_unlock_table = "UNLOCK TABLES;" (line 160)

SQL Request : Unlok tables

array $WINDOWS_SPECIAL_CHAR = array() (line 218)

Inherited Variables

Inherited from ObjectCached

ObjectCached::$m_array_already_loader
Methods
Constructor DbConnexion (line 232)

Constructor, init the requests and objects

DbConnexion DbConnexion ()
connectToDB (line 514)

Connect to db and store this cnnection in this object

  • return: TRUE on error
bool connectToDB (string $p_db,  &$r_id_connect, resource $r_id_connect)
  • string $p_db
  • resource $r_id_connect
  • &$r_id_connect
execute_multiplerequest (line 1344)

Execute multiple request in a string

  • return: TRUE on error
bool execute_multiplerequest (string $sql_to_play)
  • string $sql_to_play
formatAndProtectRequest (line 762)

Format and protect any request

  • return: TRUE on error
bool formatAndProtectRequest ( &$r_table_params,  &$p_request, array $r_table_params, string $p_request)
  • array $r_table_params
  • string $p_request: in vsprintf format with $r_table_params
  • &$r_table_params
  • &$p_request
getConnection (line 399)

Get connection

  • return: TRUE on error
bool getConnection ( &$r_super_admin_sql_connection_id,  &$r_sql_connection_information, string $p_database, resource $r_super_admin_sql_connection_id, resource $r_sql_connection_information)
  • resource $r_super_admin_sql_connection_id
  • resource $r_sql_connection_information
  • string $p_database
  • &$r_super_admin_sql_connection_id
  • &$r_sql_connection_information
getConnectionInfo (line 646)

Get connexion information

  • return: TRUE on error
bool getConnectionInfo ( &$r_db_name,  &$r_user_name,  &$r_user_pass, string $r_db_name, string $r_user_name, string $r_user_pass)
  • string $r_db_name
  • string $r_user_name
  • string $r_user_pass
  • &$r_db_name
  • &$r_user_name
  • &$r_user_pass
getCurrentInheritedSiteName (line 668)

Return the inherited site name for the current web site

string getCurrentInheritedSiteName ()
getCurrentSiteName (line 659)

Get current web site name

string getCurrentSiteName ()
getIsEcommerceWebSite (line 677)

Is ecommerce web site

bool getIsEcommerceWebSite ()
getWebsiteGroupMaster (line 984)

Return master of web group for selected database

  • return: TRUE on error
bool getWebsiteGroupMaster ( &$r_result, string $dbc_dbname, string $r_result)
  • string $r_result
  • string $dbc_dbname
  • &$r_result
lockTablesForCommandProcess (line 1455)

Lock tables for order process

  • return: TRUE on error
bool lockTablesForCommandProcess ()
makeSqlQuery (line 785)

Make an sql query in PLICI, in the current website

  • return: TRUE on error
bool makeSqlQuery (string $p_request,  &$r_table_params,  &$r_result_set, [string $p_database_selected = ""], array $r_table_params, resource $r_result_set)
  • string $p_request: in vsprintf format with $r_table_params
  • array $r_table_params
  • resource $r_result_set
  • string $p_database_selected
  • &$r_table_params
  • &$r_result_set
makeSqlQueryAdminSuper (line 689)

Make an sql query in PLICI into the super admin

  • return: TRUE on error
bool makeSqlQueryAdminSuper (string $p_request,  &$r_table_params,  &$r_result_set, array $r_table_params, resource $r_result_set)
  • string $p_request: in vsprintf format with $r_table_params
  • array $r_table_params
  • resource $r_result_set
  • &$r_table_params
  • &$r_result_set
makeSqlQueryWithId (line 744)

Make an sql query in PLICI and return the insert id

  • return: TRUE on error
bool makeSqlQueryWithId (string $p_request,  &$r_table_params,  &$r_result_set,  &$r_insert_id, array $r_table_params, resource $r_result_set, integer $r_insert_id)
  • string $p_request: in vsprintf format with $r_table_params
  • array $r_table_params
  • resource $r_result_set
  • integer $r_insert_id
  • &$r_table_params
  • &$r_result_set
  • &$r_insert_id
mustWeCheckWebsiteMasterGroup (line 1053)

Must if we must check website master group for specified table (and field)

bool mustWeCheckWebsiteMasterGroup (string $p_table, [string $p_field = null])
  • string $p_table
  • string $p_field
tableExist (line 1320)

Test if table name exist

  • return: TRUE = table exist
bool tableExist (string $p_table_name)
  • string $p_table_name
translate (line 1096)

Translate a parameter before or after receiving from database

string translate (string $p_type, string $p_data)
  • string $p_type: 'FCK_TO_DB_FCK','TO_DB','DB_FCK_TO_INPUT','DB_TO_INPUT','DB_FCK_TO_HTML','DB_TO_HTML','DB_TO_ALT','DB_TO_ARRAY_INDEX','HTML_TO_PLAIN_STRING','HTML_TO_PLAIN','HTML_TO_RSS'
  • string $p_data
unlockTablesForCommandProcess (line 1483)

Unlock tables for commande process

  • return: TRUE on error
bool unlockTablesForCommandProcess ()
xGetWebsiteGroups (line 953)

Get all webiste group

  • return: TRUE on error
  • access: private
bool xGetWebsiteGroups ( &$r_result, array $r_result)
  • array $r_result
  • &$r_result
xGetWebsiteSlave (line 1018)

Return Slave for this master

  • return: TRUE on error
bool xGetWebsiteSlave ( &$r_result, string $p_dbc_dbname, array $r_result)
  • array $r_result: Slaves
  • string $p_dbc_dbname: master database name
  • &$r_result

Inherited Methods

Inherited From ObjectCached

 ObjectCached::xClearRemember()
 ObjectCached::xClearRememberAll()
 ObjectCached::xIsRemembered()
 ObjectCached::xRemember()

Documentation generated on Tue, 25 Mar 2008 15:34:36 +0100 by phpDocumentor 1.3.2