QueryBuilder
A generic SQL query builder.
Summary
| QueryBuilder | A generic SQL query builder. |
| Functions | |
| build_insert | Creates a full insert query. |
| build_replace | Creates a full replace query. |
| build_update | Creates a full update query. |
| build_delete | Creates a full delete query. |
| build_update_values | Creates an update data part. |
| build_insert_header | Creates an insert header part. |
| build_insert_values | Creates an insert data part. |
| build_limits | Creates a LIMIT part for a query. |
| build_from | Creates a FROM header for select queries. |
| build_count | Creates a SELECT COUNT(1) query. |
| build_select_header | Creates a SELECT fields header. |
| build_where | Creates a WHERE query. |
| build_group | Creates a GROUP BY argument. |
| build_order | Creates a ORDER BY argument. |
| build_conditions | Builds an associative array of SQL values into PDO-esque paramized query strings. |
| build_in | Creates (‘one’, ‘two’) from array(“one”, “two”) |
| build_select | Creates a full SELECT query. |
| tablefy | Automatically prepends tables and table prefixes to a field if it doesn’t already have them. |
build_conditions
| public static function build_conditions( | $conds, | ||||
| & | $params, | ||||
| $tables | = | null | ) |
Builds an associative array of SQL values into PDO-esque paramized query strings.
Parameters
| $conds | Conditions. |
| $params | Parameters array to fill. |
| $tables | If specified, conditions will be tablefied with these tables. |