Ubiquity  2.4.10
php rapid development framework
SqlUtils Class Reference

SQL utilities. More...

Static Public Member Functions

static getWhere ($keyAndValues)
 
static getMultiWhere ($values, $field)
 
static getSearchWhere ($likeOp, $fields, $value, $jokerBefore='%', $jokerAfter='%')
 
static getInsertFields ($keyAndValues)
 
static getInsertFieldsValues ($keyAndValues)
 
static getUpdateFieldsKeyAndParams ($keyAndValues)
 
static getUpdateFieldsKeyAndValues ($keyAndValues)
 
static checkWhere ($condition)
 
static checkWhereParams ($condition, &$params=[])
 
static getCondition ($keyValues, $classname=NULL, $separator=' AND ')
 
static getFieldList ($fields, $tableName=false)
 

Static Public Attributes

static $quote = '`'
 

Static Private Member Functions

static getParameters ($keyAndValues)
 
static getQuotedKeys ($keyAndValues)
 

Detailed Description

SQL utilities.

Author
jc
Version
1.0.3

Definition at line 13 of file SqlUtils.php.

Member Function Documentation

◆ checkWhere()

static checkWhere (   $condition)
static

Definition at line 80 of file SqlUtils.php.

◆ checkWhereParams()

static checkWhereParams (   $condition,
$params = [] 
)
static

Definition at line 87 of file SqlUtils.php.

◆ getCondition()

static getCondition (   $keyValues,
  $classname = NULL,
  $separator = ' AND ' 
)
static

Definition at line 101 of file SqlUtils.php.

◆ getFieldList()

static getFieldList (   $fields,
  $tableName = false 
)
static
Parameters
array | string$fields
boolean | string$tableName
Returns
string

Definition at line 127 of file SqlUtils.php.

◆ getInsertFields()

static getInsertFields (   $keyAndValues)
static

Definition at line 56 of file SqlUtils.php.

◆ getInsertFieldsValues()

static getInsertFieldsValues (   $keyAndValues)
static

Definition at line 60 of file SqlUtils.php.

◆ getMultiWhere()

static getMultiWhere (   $values,
  $field 
)
static

Definition at line 40 of file SqlUtils.php.

◆ getParameters()

static getParameters (   $keyAndValues)
staticprivate

Definition at line 16 of file SqlUtils.php.

◆ getQuotedKeys()

static getQuotedKeys (   $keyAndValues)
staticprivate

Definition at line 24 of file SqlUtils.php.

◆ getSearchWhere()

static getSearchWhere (   $likeOp,
  $fields,
  $value,
  $jokerBefore = '%',
  $jokerAfter = '%' 
)
static

Definition at line 48 of file SqlUtils.php.

◆ getUpdateFieldsKeyAndParams()

static getUpdateFieldsKeyAndParams (   $keyAndValues)
static

Definition at line 64 of file SqlUtils.php.

◆ getUpdateFieldsKeyAndValues()

static getUpdateFieldsKeyAndValues (   $keyAndValues)
static

Definition at line 72 of file SqlUtils.php.

◆ getWhere()

static getWhere (   $keyAndValues)
static

Definition at line 32 of file SqlUtils.php.

Field Documentation

◆ $quote

$quote = '`'
static

Definition at line 14 of file SqlUtils.php.


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