Added prepare_execute method to db drivers

This commit is contained in:
Timothy Warren 2012-02-28 11:49:56 -05:00
parent 9b6306a713
commit 589dfe01b9
1 changed files with 15 additions and 0 deletions

View File

@ -74,6 +74,21 @@ abstract class DB_PDO extends PDO {
}
/**
* Create and execute a prepared statement with the provided parameters
*
* @param string $sql
* @param array $params
* @return PDOStatement
*/
public function prepare_execute($sql, $params)
{
$this->prepare_query($sql, $params);
$this->statement->execute();
return $this->statement;
}
// -------------------------------------------------------------------------
/**