| | |
| | | |
| | | var $a_query_results = array('dummy'); |
| | | var $last_res_id = 0; |
| | | |
| | | private $tables; |
| | | |
| | | |
| | | /** |
| | |
| | | $this->db_error_msg = $q->userinfo; |
| | | |
| | | raise_error(array('code' => 500, 'type' => 'db', |
| | | 'line' => __LINE__, 'file' => __FILE__, |
| | | 'line' => __LINE__, 'file' => __FILE__, |
| | | 'message' => $this->db_error_msg), TRUE, TRUE); |
| | | } |
| | | else |
| | |
| | | |
| | | |
| | | /** |
| | | * Wrapper for the SHOW TABLES command |
| | | * |
| | | * @return array List of all tables of the current database |
| | | */ |
| | | function list_tables() |
| | | { |
| | | // get tables if not cached |
| | | if (!$this->tables) { |
| | | $this->db_handle->loadModule('Manager'); |
| | | if (!PEAR::isError($result = $this->db_handle->listTables())) |
| | | $this->tables = $result; |
| | | else |
| | | $this->tables = array(); |
| | | } |
| | | |
| | | return $this->tables; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Formats input so it can be safely used in a query |
| | | * |
| | | * @param mixed Value to quote |