Class: SQL
Source Location: /blogs/inc/_misc/_sql.class.php
Class SQL
Class Overview
|
SQL class: help constructing queries Located in /blogs/inc/_misc/_sql.class.php [line 37] Author(s):
|
[ Top ]
Direct descendents
Property Summary
| mixed | $from | |
| mixed | $group_by | |
| mixed | $limit | |
| mixed | $order_by | |
| mixed | $search_field | |
| mixed | $search_field_regexp | |
| mixed | $select | |
| mixed | $where |
[ Top ]
Method Summary
| SQL | SQL() | Constructor. |
| void | add_search_field() | create array of search fields |
| void | display() | Get whole query |
| void | FROM() | |
| void | FROM_add() | Extends the FROM clause. |
| void | get() | Get whole query |
| void | get_from() | Get FROM clause if there is something inside |
| void | get_group_by() | Get GROUP BY clause if there is something inside |
| void | get_limit() | Get LIMIT clause if there is something inside |
| void | get_order_by() | Get ORDER BY clause if there is something inside |
| void | get_select() | Get SELECT clause if there is something inside |
| void | get_where() | Get WHERE clause if there is something inside |
| void | GROUP_BY() | |
| void | LIMIT() | |
| void | ORDER_BY() | |
| void | ORDER_BY_prepend() | |
| void | SELECT() | Set SELECT clause |
| void | SELECT_add() | Extends the SELECT clause. |
| void | WHERE() | |
| void | WHERE_and() | Extends the WHERE clause with AND |
| void | WHERE_keyword() | create the filter whith the search field array |
| void | WHERE_or() | Extends the WHERE clause with OR |
| void | WHERE_regexp() | create the filter whith the search field regexp array |
[ Top ]
Methods
add_search_field [line 303]
|
create array of search fields
Parameters:| string | $field: | field to search on |
| string | $reg_exp: | regular expression we want to use on the search for the field param |
[ Top ]
FROM_add [line 206]
|
Extends the FROM clause.
Parameters:| string | $from_add: | should typically start with INNER JOIN or LEFT JOIN |
[ Top ]
get_from [line 104]
|
Get FROM clause if there is something inside
Parameters:| $prefix: |
[ Top ]
get_group_by [line 132]
|
Get GROUP BY clause if there is something inside
Parameters:| $prefix: |
[ Top ]
get_limit [line 160]
|
Get LIMIT clause if there is something inside
Parameters:| $prefix: |
[ Top ]
get_order_by [line 146]
|
Get ORDER BY clause if there is something inside
Parameters:| $prefix: |
[ Top ]
get_select [line 90]
|
Get SELECT clause if there is something inside
Parameters:| $prefix: |
[ Top ]
get_where [line 118]
|
Get WHERE clause if there is something inside
Parameters:| $prefix: |
[ Top ]
ORDER_BY_prepend [line 275]
|
| $order_by_prepend: |
[ Top ]
SELECT_add [line 185]
|
Extends the SELECT clause.
Parameters:| srting | $select_add: | should typically start with a comma ',' |
[ Top ]
WHERE_and [line 226]
|
Extends the WHERE clause with AND
Parameters:| string | $where_and: |
[ Top ]
WHERE_keyword [line 318]
|
create the filter whith the search field array
Parameters:| string | $search: | search |
| string | $search_kw_combine: | operator( AND , OR , PHRASE ) for the filter |
[ Top ]
WHERE_or [line 249]
|
Extends the WHERE clause with OR
NOTE: there is almost NEVER a good reason to use this! Think again!
Parameters:| string | $where_or: |
[ Top ]
