I recently needed to sort query results to match the order of IDs passed to it for use in a WHERE β¦ IN()
clause. In MySQL, this can be done using the FIELD()
function in the ORDERY BY
clause. For Doctrine, which doesn’t have the FIELD()
function and doesn’t allow functions in the ORDER BY
clause, there’s a little more work needed to make use of it.
doctrine posts
Import SQL file in Doctrine / PDO
I recently needed to programmatically import SQL files containing database dumps into a database managed by Doctrine ORM.
Continue reading post "Import SQL file in Doctrine / PDO"This morning, shortly after waking up, I got a text that a site was down and others were having problems all weekend.
Continue reading post "#2384"