| | |
| | | | program/include/rcube_mdb2.php | |
| | | | | |
| | | | This file is part of the Roundcube Webmail client | |
| | | | Copyright (C) 2005-2009, Roundcube Dev. - Switzerland | |
| | | | Copyright (C) 2005-2009, The Roundcube Dev Team | |
| | | | Licensed under the GNU GPL | |
| | | | | |
| | | | PURPOSE: | |
| | |
| | | { |
| | | $params = func_get_args(); |
| | | $query = array_shift($params); |
| | | |
| | | // Support one argument of type array, instead of n arguments |
| | | if (count($params) == 1 && is_array($params[0])) |
| | | $params = $params[0]; |
| | | |
| | | return $this->_query($query, 0, 0, $params); |
| | | } |
| | |
| | | |
| | | |
| | | /** |
| | | * Wrapper for SHOW COLUMNS command |
| | | * |
| | | * @param string Table name |
| | | * @return array List of table cols |
| | | */ |
| | | function list_cols($table) |
| | | { |
| | | $this->db_handle->loadModule('Manager'); |
| | | if (!PEAR::isError($result = $this->db_handle->listTableFields($table))) { |
| | | return $result; |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Formats input so it can be safely used in a query |
| | | * |
| | | * @param mixed $input Value to quote |