| | |
| | | |
| | | /** |
| | | +-----------------------------------------------------------------------+ |
| | | | program/include/rcube_db_sqlite.php | |
| | | | | |
| | | | This file is part of the Roundcube Webmail client | |
| | | | Copyright (C) 2005-2012, The Roundcube Dev Team | |
| | | | | |
| | |
| | | | PURPOSE: | |
| | | | Database wrapper class that implements PHP PDO functions | |
| | | | for SQLite database | |
| | | | | |
| | | +-----------------------------------------------------------------------+ |
| | | | Author: Aleksander Machniak <alec@alec.pl> | |
| | | +-----------------------------------------------------------------------+ |
| | | */ |
| | | |
| | | |
| | | /** |
| | | * Database independent query interface |
| | |
| | | $q = $this->query('SELECT name FROM sqlite_master' |
| | | .' WHERE type = \'table\' ORDER BY name'); |
| | | |
| | | if ($res = $this->_get_result($q)) { |
| | | $this->tables = $res->fetchAll(PDO::FETCH_COLUMN, 0); |
| | | } |
| | | else { |
| | | $this->tables = array(); |
| | | } |
| | | $this->tables = $q ? $q->fetchAll(PDO::FETCH_COLUMN, 0) : array(); |
| | | } |
| | | |
| | | return $this->tables; |