<?php
require_once 'SQLite.php';
$sql = "SELECT * FROM foo";
try {
$connection = new SQLite("Book Store", "BookStore.sqlite");
if ($connection->IsOpen()) {
$resultSet = $connection->Execute($sql);
} else {
echo 'Cannot Perform the Task!';
}
$content = null;
if ($resultSet!=NULL) {
while ($resultSet->MoveNext()) {
$content .= $resultSet->Field(0) . " " . $resultSet->Field(1) . '<br>';
}
} else {
echo 'No Data in the Query!';
}
echo $content;
} catch (Exception $e) {
$e->getTraceAsString();
}
?>
|