database_helper.php
Table of Contents
Functions
- dbRandom() : string
- Return the database-specific random function to use in ORDER BY sql statements
- dbSelectTablesLike() : string
- Return a sql statement for finding LIKE named tables Be aware that you have to escape underscore chars by using a backslash otherwise you might get table names returned you don't want
- dbGetTablesLike() : array<string|int, mixed>
- Gets the table names. Do not prefix.
- dbQuoteFields() : string
- Wraps field names with RDBMS-specific quote characters and returns them as a comma-separated string.
Functions
dbRandom()
Return the database-specific random function to use in ORDER BY sql statements
dbRandom() : string
Return values
stringdbSelectTablesLike()
Return a sql statement for finding LIKE named tables Be aware that you have to escape underscore chars by using a backslash otherwise you might get table names returned you don't want
dbSelectTablesLike(mixed $table) : string
Parameters
- $table : mixed
Return values
stringdbGetTablesLike()
Gets the table names. Do not prefix.
dbGetTablesLike(string $table) : array<string|int, mixed>
Parameters
- $table : string
-
String to match
Tags
Return values
array<string|int, mixed> —Array of matched table names
dbQuoteFields()
Wraps field names with RDBMS-specific quote characters and returns them as a comma-separated string.
dbQuoteFields(array<string|int, mixed>|string $fields) : string
Parameters
- $fields : array<string|int, mixed>|string
-
A field name, comma-separated field names, or an array of field names.