php file isn't recognising my sqlite3 db mydb.sq3
<p>I'm running xampp.</p>

<p>I created a basic db call mydb.sq3 and a basic table called panels. That all seems to work fine because when I call <code>SELECT * FROM panels;</code> from the command line it is all good. But there is an error that keeps getting thrown when i run my php file:</p>

<blockquote>
  <p>Fatal error: Call to undefined function query() in > C:\xampp\htdocs\example\myphp.php on line 10</p>
</blockquote>

<pre><code>&lt;?php
    $db = new SQLite3('mydb.sq3');
    $result = $db--&gt;query('SELECT * FROM panels');
    while ($row = $result-&gt;fetchArray(SQLITE3_ASSOC))
    {
          echo $row['firstname'] . ': $' . $row['surname'] . '&lt;br/&gt;';
    }
   unset($db);
?&gt;
</code></pre>

<p>Cheers</p>