I am trying to query a sqlite and I cant seem to figure out why my query returns nothing...Please let me know what I am doing incorrectly: Here is my code:
<?php
class MyDB extends SQLite3
{
function __construct()
{
$this->open('zap.db');
}
}
$dbname = new MyDB();
$tablename = "test";
error_reporting (E_ALL ^ E_NOTICE);
$result = "select user FROM test";
echo "here";
$row = $dbname->query($result);
foreach ($dbname->query("$result") as $row) {
print $row["user"] . "\n";
}
?>