Untitled


SUBMITTED BY: Guest

DATE: Dec. 11, 2013, 9:56 p.m.

FORMAT: Text only

SIZE: 468 Bytes

HITS: 795

  1. if (!($db=new SQLite3('../path/db.sqlite3', 0666))) {
  2. echo "<h2>error</h2>";
  3. die();
  4. }
  5. $query = $db->query("SELECT name FROM sqlite_master
  6. WHERE type='table'
  7. ORDER BY name;");
  8. $result = $query->fetchArray(SQLITE3_ASSOC);
  9. echo "<pre><p>tables</p>";
  10. print_r($result);
  11. echo "</pre>";
  12. foreach ($result as $key => $value) {
  13. if ($value == 'blocks') {
  14. $has_blocks = 1;
  15. }
  16. }
  17. $db->close();

comments powered by Disqus