Various cleanup

This commit is contained in:
Timothy Warren 2012-03-08 13:29:30 -05:00
parent 0856de65fc
commit 80b77487eb
3 changed files with 20 additions and 30 deletions

View File

@ -83,18 +83,18 @@ class firebird extends DB_PDO {
if (isset($this->trans)) if (isset($this->trans))
{ {
$this->statement = ibase_query($this->trans, $sql); $this->statement = @ibase_query($this->trans, $sql);
} }
else else
{ {
$this->statement = ibase_query($this->conn, $sql); $this->statement = @ibase_query($this->conn, $sql);
} }
// Throw the error as a exception // Throw the error as a exception
/*if ($this->statement === FALSE) if ($this->statement === FALSE)
{ {
throw new PDOException(ibase_errmsg()); throw new PDOException(ibase_errmsg());
}*/ }
return $this->statement; return $this->statement;
} }
@ -157,13 +157,13 @@ class firebird extends DB_PDO {
*/ */
public function prepare($query, $options=NULL) public function prepare($query, $options=NULL)
{ {
$this->statement = ibase_prepare($this->conn, $query); $this->statement = @ibase_prepare($this->conn, $query);
// Throw the error as an exception // Throw the error as an exception
/*if ($this->statement === FALSE) if ($this->statement === FALSE)
{ {
throw new PDOException(ibase_errmsg()); throw new PDOException(ibase_errmsg());
}*/ }
return $this->statement; return $this->statement;
} }

View File

@ -59,28 +59,6 @@ class Query_Builder {
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
/**
* Shortcut to directly call database methods
*
* @param string $name
* @param array $params
* @return mixed
*/
public function __call($name, $params)
{
if (method_exists($this->db, $name))
{
if (is_callable($this->db->$name))
{
return call_user_func_array($this->db->$name, $params);
}
}
return NULL;
}
// --------------------------------------------------------------------------
/** /**
* Select and retrieve all records from the current table, and/or * Select and retrieve all records from the current table, and/or
* execute current compiled query * execute current compiled query
@ -93,7 +71,7 @@ class Query_Builder {
public function get($table='', $limit=FALSE, $offset=FALSE) public function get($table='', $limit=FALSE, $offset=FALSE)
{ {
// @todo Only add in the table name when using the select method // @todo Only add in the table name when using the select method
// @tood Only execute combined query when using other query methods and empty parameters // @todo Only execute combined query when using other query methods and empty parameters
$sql = 'SELECT * FROM ' . $this->db->quote_ident($table); $sql = 'SELECT * FROM ' . $this->db->quote_ident($table);
@ -172,4 +150,16 @@ class Query_Builder {
// @todo Implement from method // @todo Implement from method
return $this; return $this;
} }
// --------------------------------------------------------------------------
/**
* String together the sql statements for sending to the db
*
* @return $string
*/
private function _compile()
{
// @todo Implement _compile method
}
} }

Binary file not shown.