MDB2
[ class tree: MDB2 ] [ index: MDB2 ] [ all elements ]

Class: MDB2_Driver_Function_Common

Source Location: /MDB2-2.5.0b5/MDB2/Driver/Function/Common.php

Class Overview

MDB2_Module_Common
   |
   --MDB2_Driver_Function_Common

Base class for the function modules that is extended by each MDB2 driver


Author(s):

Methods


Inherited Variables

Inherited Methods

Class: MDB2_Module_Common

MDB2_Module_Common::__construct()
Constructor
MDB2_Module_Common::getDBInstance()
Get the instance of MDB2 associated with the module instance

Class Details

[line 64]
Base class for the function modules that is extended by each MDB2 driver

To load this module in the MDB2 object: $mdb->loadModule('Function');



[ Top ]


Method Detail

concat   [line 202]

string concat( string $value1, string $value2, string $values...)

Returns string to concatenate two or more string parameters
  • Return: to concatenate two strings
  • Access: public

Parameters:

string   $value1   — 
string   $value2   — 
string   $values...   — 

[ Top ]

executeStoredProc   [line 81]

mixed executeStoredProc( string $name, [mixed $params = null], [mixed $types = null], [mixed $result_class = true], [mixed $result_wrap_class = false])

Execute a stored procedure and return any results
  • Return: a result handle or MDB2_OK on success, a MDB2 error on failure
  • Access: public

Parameters:

string   $name   —  string that identifies the function to execute
mixed   $params   —  array that contains the paramaters to pass the stored proc
mixed   $types   —  array that contains the types of the columns in the result set
mixed   $result_class   —  string which specifies which result class to use
mixed   $result_wrap_class   —  string which specifies which class to wrap results in

[ Top ]

functionTable   [line 102]

string functionTable( )

return string for internal table used when calling only a function
  • Return: for internal table used when calling only a function
  • Access: public

[ Top ]

guid   [line 279]

string guid( )

Returns global unique identifier
  • Return: to get global unique identifier
  • Access: public

[ Top ]

length   [line 265]

return length( string $expression)

return string to call a function to get the length of a string expression
  • Return: string to get the string expression length
  • Access: public

Parameters:

string   $expression   — 

[ Top ]

lower   [line 233]

return lower( string $expression)

return string to call a function to lower the case of an expression
  • Return: string to lower case of an expression
  • Access: public

Parameters:

string   $expression   — 

[ Top ]

now   [line 122]

string now( [string $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:

  • CURRENT_TIMESTAMP (date and time, TIMESTAMP type)
  • CURRENT_DATE (date, DATE type)
  • CURRENT_TIME (time, TIME type)

  • Return: to call a variable with the current timestamp
  • Access: public

Parameters:

string   $type   —  'timestamp' | 'time' | 'date'

[ Top ]

random   [line 217]

return random( )

return string to call a function to get random value inside an SQL statement
  • Return: string to generate float between 0 and 1
  • Access: public

[ Top ]

replace   [line 184]

string replace( $str, $from_str, $to_str)

return string to call a function to get replace inside an SQL statement.
  • Return: to call a function to get a replace
  • Access: public

Parameters:

   $str   — 
   $from_str   — 
   $to_str   — 

[ Top ]

substring   [line 167]

string substring( $value, [ $position = 1], [ $length = null])

return string to call a function to get a substring inside an SQL statement
  • Return: to call a function to get a substring
  • Access: public

Parameters:

   $value   — 
   $position   — 
   $length   — 

[ Top ]

unixtimestamp   [line 146]

string unixtimestamp( string $expression)

return string to call a function to get the unix timestamp from a iso timestamp
  • Return: to call a variable with the timestamp
  • Access: public

Parameters:

string   $expression   — 

[ Top ]

upper   [line 249]

return upper( string $expression)

return string to call a function to upper the case of an expression
  • Return: string to upper case of an expression
  • Access: public

Parameters:

string   $expression   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:51:34 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.