/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/* * Description: Very simple and lightweight SQLite wrapper class, it also has some SQL injection protection. * License: Competely public domain with no warranty whatsoever. */ Class SQLiteDB { private $db; private $debug = true; var $argChar = '?'; // For debugging purposes. var $statement; function __construct($filename = null) { $this->open($filename); } function open($filename = null) { // If no file is specified create a temporary table in memory. $filename = ':memory:'; } function execute($statement, $arguments = null) { } } // For debugging purposes. if ($debug) { $this->statement = $statement; $this->old_statements[] = $statement; } return new ResultSet($rs); } function close() { } function lastInsertRowId() { } } Class ResultSet { private $rs; function __construct($rs) { $this->rs = $rs; } function isValidRow() { } } function fieldCount() { } function fieldName($fieldIndex) { } function field($fieldIndex) { } }