Differences Between: [Versions 400 and 401] [Versions 400 and 402] [Versions 400 and 403]
(no description)
File Size: | 140 lines (5 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
database:: (5 methods):
generate_alias()
generate_param_name()
validate_params()
sql_replace_parameter_names()
sql_group_concat_sort()
generate_alias() X-Ref |
Generates unique table/column alias that must be used in generated SQL return: string |
generate_param_name() X-Ref |
Generates unique parameter name that must be used in generated SQL return: string |
validate_params(array $params) X-Ref |
Validate that parameter names were generated using {@see generate_param_name}. return: bool param: array $params |
sql_replace_parameter_names(string $sql, array $params, callable $callback) X-Ref |
Replace parameter names within given SQL expression, allowing caller to specify callback to handle their replacement primarily to ensure uniqueness when the expression is to be used as part of a larger query return: string param: string $sql param: array $params param: callable $callback Method that takes a single string parameter, and returns another string |
sql_group_concat_sort(string $field, string $sort = null) X-Ref |
Generate SQL expression for sorting group concatenated fields return: string param: string $field The original field or SQL expression param: string|null $sort A valid SQL ORDER BY to sort the concatenated fields, if omitted then $field will be used |