-
-
Save LawnGnome/66edb4c3cce643d178f2 to your computer and use it in GitHub Desktop.
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 | |
@unlink('a.db'); | |
@unlink('b.db'); | |
$a = new PDO('sqlite:a.db'); | |
$b = new PDO('sqlite:b.db'); | |
$a->query('CREATE TABLE a (i INTEGER)'); | |
$b->query('CREATE TABLE b (i INTEGER)'); | |
unset($a); | |
unset($b); | |
$a = new PDO('sqlite:a.db'); | |
$a->query('ATTACH DATABASE \'b.db\' AS b'); | |
var_dump($a->query('SELECT * FROM b.b')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment