diff options
author | Stanislau Wolski <stanislau.wolski@gmail.com> | 2013-10-18 14:02:16 +0300 |
---|---|---|
committer | Stanislau Wolski <stanislau.wolski@gmail.com> | 2013-10-18 14:02:16 +0300 |
commit | c2e1fd58b0c848118cf8554de50f788199d609e2 (patch) | |
tree | bd30b3b7de59b34120705465e8628a740cdb513d /codebase/connector/db_sqlite3.php | |
download | scheduler-c2e1fd58b0c848118cf8554de50f788199d609e2.zip scheduler-c2e1fd58b0c848118cf8554de50f788199d609e2.tar.gz scheduler-c2e1fd58b0c848118cf8554de50f788199d609e2.tar.bz2 |
[add] version 4.0v4.0.0
Diffstat (limited to 'codebase/connector/db_sqlite3.php')
-rw-r--r-- | codebase/connector/db_sqlite3.php | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/codebase/connector/db_sqlite3.php b/codebase/connector/db_sqlite3.php new file mode 100644 index 0000000..349490b --- /dev/null +++ b/codebase/connector/db_sqlite3.php @@ -0,0 +1,33 @@ +<?php +/* + @author dhtmlx.com + @license GPL, see license.txt +*/ +require_once("db_common.php"); +/*! SQLite implementation of DataWrapper +**/ +class SQLite3DBDataWrapper extends DBDataWrapper{ + + public function query($sql){ + LogMaster::log($sql); + + $res = $this->connection->query($sql); + if ($res === false) + throw new Exception("SQLLite - sql execution failed\n".$this->connection->lastErrorMsg()); + + return $res; + } + + public function get_next($res){ + return $res->fetchArray(); + } + + public function get_new_id(){ + return $this->connection->lastInsertRowID(); + } + + public function escape($data){ + return $this->connection->escapeString($data); + } +} +?>
\ No newline at end of file |