Last active
August 29, 2015 13:56
-
-
Save pmjones/9142155 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 | |
require "../autoload.php"; | |
$pdo = new Aura\Sql\ExtendedPdo('sqlite::memory:'); | |
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); | |
$pdo->exec('CREATE TABLE foo (bar VARCHAR(20))'); | |
$stm = 'INSERT INTO foo (bar) VALUES (:bar)'; | |
$pdo->bindValues(array('bar' => 'baz')); | |
$pdo->exec($stm); | |
$pdo->bindValues(array('bar' => null)); | |
$pdo->exec($stm); | |
$rows = $pdo->fetchAll('SELECT * FROM foo'); | |
var_dump($rows); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment