| | |
| | | /** |
| | | * Obtain the PEAR::DB class that is used for abstraction |
| | | */ |
| | | require_once('DB.php'); |
| | | |
| | | require_once 'DB.php'; |
| | | |
| | | /** |
| | | * Database independent query interface |
| | | * |
| | | * This is a wrapper for the PEAR::DB class |
| | | * |
| | | * @package RoundCube Webmail |
| | | * @package Database |
| | | * @author David Saez Padros <david@ols.es> |
| | | * @author Thomas Bruederli <roundcube@gmail.com> |
| | | * @version 1.17 |
| | |
| | | $this->db_handle = $this->dsn_connect($dsn); |
| | | $this->db_connected = $this->db_handle ? TRUE : FALSE; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Activate/deactivate debug mode |
| | | * (not implemented) |
| | | */ |
| | | function set_debug($dbg = true) |
| | | { |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Getter for error state |
| | | * |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Escapes a string |
| | | * |
| | | * @param string The string to be escaped |
| | | * @return string The escaped string |
| | | * @access public |
| | | */ |
| | | function escapeSimple($str) |
| | | { |
| | | if (!$this->db_handle) |
| | | $this->db_connect('r'); |
| | | |
| | | return $this->db_handle->escapeSimple($str); |
| | | } |
| | | |
| | | |
| | | /* |
| | | * Return SQL function for current time and date |
| | | * |
| | |
| | | |
| | | } // end class rcube_db |
| | | |
| | | ?> |
| | | ?> |