Created
August 27, 2014 02:44
-
-
Save raphox/2fc60479339dc7384d25 to your computer and use it in GitHub Desktop.
Execute native query #doctrine #symfony2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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