Documentation

Sql_Controller
in package

SQL.

Tags
subpackage

Sql

version
7.x
copyright

© 2005-2025, https://www.hostcms.ru

Table of Contents

Properties

$instance  : mixed
The singleton instances.
$_config  : array<string|int, mixed>|null
$_Core_DataBase  : Core_DataBase|null

Methods

__construct()  : mixed
execute()  : mixed
Выполнение SQL-запроса
executeByFile()  : mixed
Выполнение SQL-запроса из файла
executeByString()  : mixed
Выполнение SQL-запроса из строки
getFieldsIcon()  : Admin_Form_Entity
Get fields icon
getIndexesIcon()  : Admin_Form_Entity
Get indexes icon
getTableViewIcon()  : Admin_Form_Entity
Get fields icon
instance()  : object
Register an existing instance as a singleton.
sanitizeIdentifiers()  : string
Sanitize MySQL Identifiers
_executeQuery()  : bool
Выполнение SQL-запроса из строки с подменой ENGINE и CHARSET

Properties

$instance

The singleton instances.

public static mixed $instance = \NULL

$_config

protected array<string|int, mixed>|null $_config = \NULL

Methods

execute()

Выполнение SQL-запроса

public execute(string $sql) : mixed
Parameters
$sql : string

SQL-запрос

Tags
see
executeByString()
Return values
mixed

количество выполненных запросов или NULL

executeByFile()

Выполнение SQL-запроса из файла

public executeByFile(string $filePath) : mixed
Parameters
$filePath : string

путь к файлу

Return values
mixed

количество выполненных запросов или NULL

executeByFile(CMS_FOLDER . 'sql/myfile.sql'); ?>

executeByString()

Выполнение SQL-запроса из строки

public executeByString(string $sql) : mixed
Parameters
$sql : string

SQL-запрос

Return values
mixed

количество выполненных запросов

Sql_Controller::instance()->executeByString($sql); ?>

getFieldsIcon()

Get fields icon

public static getFieldsIcon(mixed $tableName[, string $class = 'fa fa-th-list h5-edit-icon azure' ]) : Admin_Form_Entity
Parameters
$tableName : mixed
$class : string = 'fa fa-th-list h5-edit-icon azure'
Return values
Admin_Form_Entity

getIndexesIcon()

Get indexes icon

public static getIndexesIcon(mixed $tableName[, string $class = 'fas fa-key h5-edit-icon success' ]) : Admin_Form_Entity
Parameters
$tableName : mixed
$class : string = 'fas fa-key h5-edit-icon success'
Return values
Admin_Form_Entity

getTableViewIcon()

Get fields icon

public static getTableViewIcon(mixed $tableName[, string $class = 'fa fa-table h5-edit-icon warning' ]) : Admin_Form_Entity
Parameters
$tableName : mixed
$class : string = 'fa fa-table h5-edit-icon warning'
Return values
Admin_Form_Entity

instance()

Register an existing instance as a singleton.

public static instance() : object
Return values
object

sanitizeIdentifiers()

Sanitize MySQL Identifiers

public static sanitizeIdentifiers(mixed $str) : string
Parameters
$str : mixed
Return values
string

_executeQuery()

Выполнение SQL-запроса из строки с подменой ENGINE и CHARSET

protected _executeQuery(string $sql) : bool
Parameters
$sql : string

SQL-запрос

Return values
bool

        
On this page

Search results