xPDO.getConnection
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::getConnection¶
Returns the current connection to the database, selecting one from the pool if the xPDO::OPT_CONNECTIONS option is configured. Returns the underlying PDO instance, or null if no connection is available.
Syntax¶
\PDO|null getConnection ([array $options = array()])
Example¶
$pdo = $xpdo->getConnection();
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










