xPDO.prepare
Last updated not available | Page history | Improve this page | Report an issue
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$185 per month—let's make that $500!
Learn morexPDO::prepare¶
Prepares an SQL statement for execution and returns a PDOStatement object, or false on failure. Bind parameters to the statement before executing it.
Syntax¶
\PDOStatement|boolean prepare (string $statement, [array $driver_options = array()])
Example¶
$stmt = $xpdo->prepare('SELECT * FROM my_table WHERE id = :id');
$stmt->bindValue(':id', 42, PDO::PARAM_INT);
$stmt->execute();
See Also¶
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$185 per month—let's make that $500!
Learn more










