// this is the function I call from my code. it is in mdb2.php function &query($query, $types = null, $result_class = true, $result_wrap_class = false) { $offset = $this->offset; $limit = $this->limit; $this->offset = $this->limit = 0; $query = $this->_modifyQuery($query, false, $limit, $offset); $connection = $this->getConnection(); if (PEAR::isError($connection)) { return $connection; } $result =& $this->_doQuery($query, false, $connection, $this->database_name); if (PEAR::isError($result)) { return $result; } $result =& $this->_wrapResult($result, $types, $result_class, $result_wrap_class, $limit, $offset); return $result; } The line $result =& $this->_doQuery($query, false, $connection, $this->database_name); is not going inside. instead it is bombing in function __call($method, $params) { $module = null; if (preg_match('/^([a-z]+)([A-Z])(.*)$/', $method, $match) && isset($this->options['modules'][$match[1]]) ) { $module = $this->options['modules'][$match[1]]; $method = strtolower($match[2]).$match[3]; if (!isset($this->modules[$module]) || !is_object($this->modules[$module])) { $result =& $this->loadModule($module); if (PEAR::isError($result)) { return $result; } } } else { foreach ($this->modules as $key => $foo) { if (is_object($this->modules[$key]) && method_exists($this->modules[$key], $method) ) { $module = $key; break; } } } if (!is_null($module)) { return call_user_func_array(array(&$this->modules[$module], $method), $params); } trigger_error(sprintf('Call to undefined function: %s::%s().', get_class($this), $method), E_USER_ERROR); }