Documentation

Sql_Controller
in package

SQL.

Tags
subpackage

Sql

version
7.x
author

Hostmake LLC

copyright

© 2005-2024 ООО "Хостмэйк" (Hostmake LLC), http://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-запроса из строки
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); ?>

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