Access sqlite database
$dbconn = sqlite_open('phpdb');
if ($dbconn) {
sqlite_query($dbconn, "CREATE TABLE animal(Name VARCHAR(255), MaxAge INT);");
sqlite_query($dbconn, "INSERT INTO animal VALUES ('A', 15)");
$result = sqlite_query($dbconn, "SELECT Name FROM animal");
var_dump(sqlite_fetch_array($result, SQLITE_ASSOC));
} else {
print "Connection to database failed!\n";
}
Related examples in the same category