Documentation

SQL
in package

Provides SQL building functions.

Tags
copyright

CLOUDREXX CMS - CLOUDREXX AG

author

CLOUDREXX Development Team info@cloudrexx.com

subpackage

lib_framework

Table of Contents

Methods

insert()  : mixed
Generates insert SQL
update()  : mixed
Generates update SQL
apostrophizeIfString()  : mixed
columnPart()  : mixed

Methods

insert()

Generates insert SQL

public static insert(string $table, array<string|int, mixed> $columns[, array<string|int, mixed> $options = array() ]) : mixed
Parameters
$table : string

the table name

$columns : array<string|int, mixed>

array( <column_name> => | array( 'val' => string, #the value [ 'omitEmpty' => boolean ] #skip fields with empty value (null or empty string)? defaults to false ) ) [ , ... ]

$options : array<string|int, mixed> = array()

global options. optional. array( 'escape' => boolean #whether strings are escaped automatically )

update()

Generates update SQL

public static update(string $table, array<string|int, mixed> $columns[, array<string|int, mixed> $options = array() ]) : mixed
Parameters
$table : string

the table name

$columns : array<string|int, mixed>

array( <column_name> => | array( 'val' => string, #the value [ 'omitEmpty' => boolean ] #skip fields with empty value (null or empty string)? defaults to false ) ) [ , ... ]

$options : array<string|int, mixed> = array()

global options. optional. array( 'escape' => boolean #whether strings are escaped automatically )

apostrophizeIfString()

protected static apostrophizeIfString(mixed $value, mixed $escape) : mixed
Parameters
$value : mixed
$escape : mixed

columnPart()

protected static columnPart(mixed $columns, mixed $escape) : mixed
Parameters
$columns : mixed
$escape : mixed

        
On this page

Search results