Skip to content

Instantly share code, notes, and snippets.

@raphox
Created August 27, 2014 02:44
Show Gist options
  • Save raphox/2fc60479339dc7384d25 to your computer and use it in GitHub Desktop.
Save raphox/2fc60479339dc7384d25 to your computer and use it in GitHub Desktop.
Execute native query #doctrine #symfony2
<?php
class AcmeController extends Controller
{
public function indexAction() {
$em = $this->getDoctrine()->getManager();
$conn = $em->getConnection();
$conn->prepare('SET foreign_key_checks = 0')->execute();
// ...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment