Skip to content

Instantly share code, notes, and snippets.

@ablyler
Created August 24, 2013 14:14
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ablyler/6328383 to your computer and use it in GitHub Desktop.
<?php
$db = new SQLite3('file:memdb1?mode=memory&cache=shared');
$db->exec('CREATE TABLE foo (bar STRING)');
$db->exec("INSERT INTO foo (bar) VALUES ('This is a test')");
$result = $db->query('SELECT bar FROM foo');
var_dump($result->fetchArray());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment