Last active
April 4, 2017 21:34
-
-
Save mchelen/eaf0fc1b24b7a537e8095850407de3f9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| BEGIN TRANSACTION; | |
| CREATE TABLE `Users` ( | |
| `id` INTEGER, | |
| `name` TEXT | |
| ); | |
| INSERT INTO `Users` VALUES (1,'foo'); | |
| INSERT INTO `Users` VALUES (2,'bar'); | |
| COMMIT; |
This file contains hidden or 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 | |
| $config = new \Doctrine\DBAL\Configuration(); | |
| $connectionParams = array( | |
| 'url' => 'sqlite:///:memory:', | |
| ); | |
| $this->conn = \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config); | |
| $sql = file_get_contents('blah.sql'); | |
| $this->conn->exec($sql); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment