ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
MDB2_Driver_Function_mysqli Class Reference
+ Inheritance diagram for MDB2_Driver_Function_mysqli:
+ Collaboration diagram for MDB2_Driver_Function_mysqli:

Public Member Functions

executeStoredProc ($name, $params=null, $types=null, $result_class=true, $result_wrap_class=false)
 Execute a stored procedure and return any results. More...
 
 concat ($value1, $value2)
 Returns string to concatenate two or more string parameters. More...
 
 guid ()
 Returns global unique identifier. More...
 
- Public Member Functions inherited from MDB2_Driver_Function_Common
executeStoredProc ($name, $params=null, $types=null, $result_class=true, $result_wrap_class=false)
 Execute a stored procedure and return any results. More...
 
 functionTable ()
 return string for internal table used when calling only a function More...
 
 now ($type='timestamp')
 Return string to call a variable with the current timestamp inside an SQL statement There are three special variables for current date and time: More...
 
 substring ($value, $position=1, $length=null)
 return string to call a function to get a substring inside an SQL statement More...
 
 concat ($value1, $value2)
 Returns string to concatenate two or more string parameters. More...
 
 random ()
 return string to call a function to get random value inside an SQL statement More...
 
 lower ($expression)
 return string to call a function to lower the case of an expression More...
 
 upper ($expression)
 return string to call a function to upper the case of an expression More...
 
 guid ()
 Returns global unique identifier. More...
 
- Public Member Functions inherited from MDB2_Module_Common
 __construct ($db_index)
 Constructor. More...
 
 MDB2_Module_Common ($db_index)
 PHP 4 Constructor. More...
 
getDBInstance ()
 Get the instance of MDB2 associated with the module instance. More...
 

Additional Inherited Members

- Data Fields inherited from MDB2_Module_Common
 $db_index
 

Detailed Description

Definition at line 57 of file mysqli.php.

Member Function Documentation

◆ concat()

MDB2_Driver_Function_mysqli::concat (   $value1,
  $value2 
)

Returns string to concatenate two or more string parameters.

Parameters
string$value1
string$value2
string$values,...
Returns
string to concatenate two strings public

Definition at line 106 of file mysqli.php.

107  {
108  $args = func_get_args();
109  return "CONCAT(".implode(', ', $args).")";
110  }

◆ executeStoredProc()

& MDB2_Driver_Function_mysqli::executeStoredProc (   $name,
  $params = null,
  $types = null,
  $result_class = true,
  $result_wrap_class = false 
)

Execute a stored procedure and return any results.

Parameters
string$namestring that identifies the function to execute
mixed$paramsarray that contains the paramaters to pass the stored proc
mixed$typesarray that contains the types of the columns in the result set
mixed$result_classstring which specifies which result class to use
mixed$result_wrap_classstring which specifies which class to wrap results in
Returns
mixed a result handle or MDB2_OK on success, a MDB2 error on failure public

Definition at line 74 of file mysqli.php.

References $params, $query, $result, MDB2_Module_Common\getDBInstance(), and PEAR\isError().

75  {
76  $db =& $this->getDBInstance();
77  if (PEAR::isError($db)) {
78  return $db;
79  }
80 
81  $multi_query = $db->getOption('multi_query');
82  if (!$multi_query) {
83  $db->setOption('multi_query', true);
84  }
85  $query = 'CALL '.$name;
86  $query .= $params ? '('.implode(', ', $params).')' : '()';
87  $result =& $db->query($query, $types, $result_class, $result_wrap_class);
88  if (!$multi_query) {
89  $db->setOption('multi_query', false);
90  }
91  return $result;
92  }
$params
Definition: disable.php:11
$result
$query
& getDBInstance()
Get the instance of MDB2 associated with the module instance.
Definition: MDB2.php:4244
isError($data, $code=null)
Tell whether a value is a PEAR error.
Definition: PEAR.php:280
+ Here is the call graph for this function:

◆ guid()

MDB2_Driver_Function_mysqli::guid ( )

Returns global unique identifier.

Returns
string to get global unique identifier public

Definition at line 121 of file mysqli.php.

122  {
123  return 'UUID()';
124  }

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