xPDO.literal
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::literal¶
Escapes a value for use as a string literal in SQL. This is a lower-level helper used when building raw SQL; prefer prepared statements and bound parameters wherever possible.
Syntax¶
string literal (string $string)
Example¶
$sql = 'SELECT * FROM my_table WHERE name = ' . $xpdo->literal($name);
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










