server-php-sqlite-memory.php / php
<?php // create a new memory only database // Create a 2-column table bar & insert 2 rows into it /* For improved performance the entire query block is wrapped inside a transaction. */ db->query("BEGIN; CREATE TABLE bar ( id INTEGER PRIMARY KEY, id2 ); INSERT INTO bar (id2) VALUES(1); INSERT INTO bar (id2) VALUES(2); COMMIT;"); // will print "2 insert queries" echo db->lastInsertRowid(); ?>
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.