diff options
Diffstat (limited to 'phpBB/includes/db/sqlite.php')
-rw-r--r-- | phpBB/includes/db/sqlite.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/phpBB/includes/db/sqlite.php b/phpBB/includes/db/sqlite.php index 5ae36df4f5..c6f6f8fc9b 100644 --- a/phpBB/includes/db/sqlite.php +++ b/phpBB/includes/db/sqlite.php @@ -25,6 +25,12 @@ include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx); */ class dbal_sqlite extends dbal { + // like MS ACCESS, SQLite does not support COUNT(DISTINCT ...) + var $count_distinct = false; + + // can't truncate a table + var $truncate = false; + /** * Connect to server */ @@ -258,6 +264,20 @@ class dbal_sqlite extends dbal } /** + * Expose a DBMS specific function + */ + function sql_function($type, $col) + { + switch ($type) + { + case 'length_varchar': + case 'length_text': + return 'LENGTH(' . $col . ')'; + break; + } + } + + /** * return sql error array * @access private */ |