Using raw PDO MySQL queries with safe placeholders in Symfony

This comes in handy as Doctrine doesn’t always support all native MySQL commands and functions.  Strangely, certain common time and date-related ones like YEAR(), MONTH() and DAY().

The $paramsArr is an array for all placeholders in your standard PDO query.

 

Aaron Belchamber has written 246 articles

Leave a Reply

Your email address will not be published. Required fields are marked *