| | |
| | | | program/include/rcube_mdb2.php | |
| | | | | |
| | | | This file is part of the RoundCube Webmail client | |
| | | | Copyright (C) 2005-2008, RoundCube Dev. - Switzerland | |
| | | | Copyright (C) 2005-2009, RoundCube Dev. - Switzerland | |
| | | | Licensed under the GNU GPL | |
| | | | | |
| | | | PURPOSE: | |
| | |
| | | function _query($query, $offset, $numrows, $params) |
| | | { |
| | | // Read or write ? |
| | | if (strtolower(trim(substr($query,0,6)))=='select') |
| | | if (strtolower(substr(trim($query),0,6))=='select') |
| | | $mode='r'; |
| | | else |
| | | $mode='w'; |
| | |
| | | $data = file_get_contents($file_name); |
| | | |
| | | if (strlen($data)) |
| | | sqlite_exec($dbh->connection, $data); |
| | | if (!sqlite_exec($dbh->connection, $data, $error) || MDB2::isError($dbh)) |
| | | raise_error(array('code' => 500, 'type' => 'db', |
| | | 'line' => __LINE__, 'file' => __FILE__, 'message' => $error), TRUE, FALSE); |
| | | } |
| | | |
| | | |