PEEL Shopping
Open source ecommerce : PEEL Shopping
Functions
database.php File Reference

Go to the source code of this file.

Functions

if(!defined('IN_PEEL')) db_connect (&$database_object, $database_name=null, $serveur_mysql=null, $utilisateur_mysql=null, $mot_de_passe_mysql=null, $continue_if_error=false)
 db_connect() More...
 
 select_db ($database_name, &$database_object, $continue_if_error=false)
 select_db() More...
 
 query ($query, $die_if_error=false, $database_object=null, $silent_if_error=false, $security_sql_filter=true)
 The query() function is meant to be called anywhere you want to make a query. More...
 
 fetch_row ($query_result)
 fetch_row() More...
 
 fetch_assoc ($query_result)
 fetch_assoc() More...
 
 fetch_object ($query_result)
 fetch_object() More...
 
 num_rows ($query_result)
 num_rows() More...
 
 insert_id ($database_object=null)
 insert_id() More...
 
 affected_rows ($database_object=null)
 affected_rows() More...
 
 real_escape_string ($value)
 real_escape_string() More...
 
 nohtml_real_escape_string ($value, $allowed_tags=null)
 Protège les données pour insertion dans MySQL ET supprime les tags HTML pour protéger de toute sorte de XSS. More...
 
 word_real_escape_string ($value)
 Applique real_escape_string dans le cas où on n'insère qu'un seul mot, de moins de 30 caractères. More...
 
 create_sql_from_array ($array)
 create_sql_from_array() More...
 
 get_table_fields ($table_name, $database_object=null, $silent_if_error=false)
 get_table_fields() More...
 
 get_table_field_names ($table_name, $link_identifier=null, $silent_if_error=false)
 get_table_field_names() More...
 
 get_table_field_types ($table_name, $link_identifier=null, $silent_if_error=false)
 get_table_field_types() More...
 
 get_table_index ($table_name, $link_identifier=null, $silent_if_error=false)
 get_table_index() More...
 
listTables ($name_part=null)
 Renvoie un tableau avec la liste des tables de la base courante. More...
 
list_dbs ($name_part=null)
 Renvoie un tableau avec la liste des bases de données accessibles. More...
 
 db_close ($database_object=null)
 db_close() More...
 

Function Documentation

affected_rows (   $database_object = null)

affected_rows()

Returns

Definition at line 356 of file database.php.

create_sql_from_array (   $array)

create_sql_from_array()

Parameters
mixed$array
Returns

Definition at line 449 of file database.php.

db_close (   $database_object = null)

db_close()

Returns

Definition at line 605 of file database.php.

if (!defined('IN_PEEL')) db_connect ( $database_object,
  $database_name = null,
  $serveur_mysql = null,
  $utilisateur_mysql = null,
  $mot_de_passe_mysql = null,
  $continue_if_error = false 
)

db_connect()

Parameters
object$database_object
string$database_name
string$serveur_mysql
string$utilisateur_mysql
string$mot_de_passe_mysql
boolean$continue_if_error
Returns

Definition at line 31 of file database.php.

fetch_assoc (   $query_result)

fetch_assoc()

Parameters
mixed$query_result
Returns

Definition at line 283 of file database.php.

fetch_object (   $query_result)

fetch_object()

Parameters
mixed$query_result
Returns

Definition at line 302 of file database.php.

fetch_row (   $query_result)

fetch_row()

Parameters
mixed$query_result
Returns

Definition at line 264 of file database.php.

get_table_field_names (   $table_name,
  $link_identifier = null,
  $silent_if_error = false 
)

get_table_field_names()

Parameters
mixed$table_name
mixed$link_identifier
boolean$silent_if_error
Returns

Definition at line 495 of file database.php.

get_table_field_types (   $table_name,
  $link_identifier = null,
  $silent_if_error = false 
)

get_table_field_types()

Parameters
mixed$table_name
mixed$link_identifier
boolean$silent_if_error
Returns

Definition at line 516 of file database.php.

get_table_fields (   $table_name,
  $database_object = null,
  $silent_if_error = false 
)

get_table_fields()

Parameters
mixed$table_name
mixed$database_object
boolean$silent_if_error
Returns

Definition at line 473 of file database.php.

get_table_index (   $table_name,
  $link_identifier = null,
  $silent_if_error = false 
)

get_table_index()

Parameters
mixed$table_name
mixed$link_identifier
boolean$silent_if_error
Returns

Definition at line 537 of file database.php.

insert_id (   $database_object = null)

insert_id()

Returns

Definition at line 339 of file database.php.

& list_dbs (   $name_part = null)

Renvoie un tableau avec la liste des bases de données accessibles.

Parameters
string$name_partChaîne de caractère devant faire partie du nom des tables recherchées
Returns
array liste des bases indexée par leurs noms public

Definition at line 584 of file database.php.

& listTables (   $name_part = null)

Renvoie un tableau avec la liste des tables de la base courante.

Parameters
string$name_partChaîne de caractère devant faire partie du nom des tables recherchées
Returns
array liste des tables indexée par leurs noms public

Definition at line 561 of file database.php.

nohtml_real_escape_string (   $value,
  $allowed_tags = null 
)

Protège les données pour insertion dans MySQL ET supprime les tags HTML pour protéger de toute sorte de XSS.

Parameters
mixed$value
mixed$allowed_tags
Returns

Definition at line 400 of file database.php.

num_rows (   $query_result)

num_rows()

Parameters
mixed$query_result
Returns

Definition at line 321 of file database.php.

query (   $query,
  $die_if_error = false,
  $database_object = null,
  $silent_if_error = false,
  $security_sql_filter = true 
)

The query() function is meant to be called anywhere you want to make a query.

Thus, it allows a code independant from the database server functions.

Parameters
string$query
boolean$die_if_errorIf you want by default the program to stop if an error occurs, put $die_if_error at true by default
mixed$database_object
mixed$silent_if_error
mixed$security_sql_filter
Returns
It returns the link to the result of the query

Definition at line 158 of file database.php.

real_escape_string (   $value)

real_escape_string()

Parameters
mixed$valueString or array
Returns

Definition at line 374 of file database.php.

select_db (   $database_name,
$database_object,
  $continue_if_error = false 
)

select_db()

Parameters
string$database_name
object$database_object
boolean$continue_if_error
Returns

Definition at line 110 of file database.php.

word_real_escape_string (   $value)

Applique real_escape_string dans le cas où on n'insère qu'un seul mot, de moins de 30 caractères.

Parameters
mixed$value
Returns

Definition at line 424 of file database.php.


This documentation for Open ecommerce PEEL Shopping and PEEL.fr has been generated by Doxygen on Thu Oct 15 2015 14:41:40 - Peel ecommerce is a product of Agence web Advisto SAS. All rights reserved.