if (!($db=new SQLite3('../path/db.sqlite3', 0666)))	{
	echo "<h2>error</h2>";
	die();
	}

$query = $db->query("SELECT name FROM sqlite_master
WHERE type='table'
ORDER BY name;");

$result = $query->fetchArray(SQLITE3_ASSOC);
echo "<pre><p>tables</p>";
print_r($result);
echo "</pre>";	

foreach ($result as $key => $value) {
	if ($value == 'blocks') {
	$has_blocks = 1;
	}
}


$db->close();	