diff options
author | Christian Schneider | 2007-08-08 12:33:16 +0000 |
---|---|---|
committer | Christian Schneider | 2007-08-08 12:33:16 +0000 |
commit | 983823c499ab3aea81298a8284dbb8d28b4a1b1b (patch) | |
tree | b20b9e99e1499a6c7024cfbb11b134f6ef9f99c8 /it_db_table.class | |
parent | 29684057b2d1e51ec37cdc9cf837ad68ce3905c5 (diff) | |
download | itools-983823c499ab3aea81298a8284dbb8d28b4a1b1b.tar.gz itools-983823c499ab3aea81298a8284dbb8d28b4a1b1b.tar.bz2 itools-983823c499ab3aea81298a8284dbb8d28b4a1b1b.zip |
Make _where use proper db link and moved db_table only code to db_table.class
Diffstat (limited to 'it_db_table.class')
-rw-r--r-- | it_db_table.class | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/it_db_table.class b/it_db_table.class index 5536ccf..455cf2e 100644 --- a/it_db_table.class +++ b/it_db_table.class @@ -55,10 +55,12 @@ function safe_sql_select($query, $fields="*") /** * Create an SQL query (the stuff after 'WHERE'). * @see it_dbi::_where() for more details. + * @param $sql Optional SQL addendum (added after $params), for ORDER BY etc. + * @param $omit_where (optional) Do not add 'WHERE ' at beginning of result (default: false) */ function construct_sql_clause($params='', $sql='', $omit_where=false) { - return it_dbi::_where($params, $sql, $omit_where); + return trim(it_dbi::_where($params, null, $omit_where) . " $sql"); } |