Parameter | Description |
---|---|
$dbh |
Database object |
$procedure |
Optional procedure to call |
use FaaPz\PDO\Database;
use FaaPz\PDO\Statement\Call;
$database = new Database('mysql:host=localhost;dbname=test_db;charset=UTF8');
// CALL MyProcedure(?, ?)
$call = new Call($database, new Method('MyProcedure', 1, 2));
$call->execute();
Adds a stored procedure Method clause to the call statement.
Parameter | Description |
---|---|
$procedure |
Procedure to call |
use FaaPz\PDO\Clause\Method;
use FaaPz\PDO\Statement\Call;
use FaaPz\PDO\Database;
$database = new Database('mysql:host=localhost;dbname=test_db;charset=UTF8');
// CALL MyProcedure(?, ?)
$database->call()
->method(new Method('MyProcedure', 1, 2));