Files
John Coggeshall 9a19bb0e15 Adding three talks
2003-10-19 18:50:53 +00:00

34 lines
827 B
XML
Executable File

<slide title="SQLite">
<blurb>
SQLite is one of the most interesting new features in PHP.
</blurb>
<list>
<bullet>A completely server-less SQL interface to the filesystem</bullet>
<bullet>Allows you to replace custom flat-file storage with a SQL-complaint system</bullet>
<bullet>Completely bundled with PHP, can be relied on in most cases</bullet>
</list>
<example fontsize="1.6em" title="Using SQLite"><![CDATA[<?php
sqlite_open(':memory:', 0666, $sqliteerror);
if ($db) {
sqlite_query($db,
'CREATE TABLE foo (bar varchar(10))');
sqlite_query($db,
"INSERT INTO foo VALUES ('fnord')");
$result = sqlite_query($db,'select bar from foo');
$record = sqlite_fetch_array($result);
echo "<pre>";
var_dump($record);
echo "</pre>";
} else {
die ($sqliteerror);
}
?>]]>
</example>
</slide>