Added prepare_execute method to db drivers
This commit is contained in:
parent
9b6306a713
commit
589dfe01b9
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user