Skip to content

Instantly share code, notes, and snippets.

@malikkurosaki
Last active August 7, 2018 04:47
Show Gist options
  • Save malikkurosaki/924bbb14f0304d0a6034a70f842d7202 to your computer and use it in GitHub Desktop.
Save malikkurosaki/924bbb14f0304d0a6034a70f842d7202 to your computer and use it in GitHub Desktop.
sqlite3 show all table name
<?php
$db = new SQLite3("mydb.db");
$perintah = <<<AOD
SELECT sql FROM sqlite_master WHERE type="table"
AOD;
$kerjakan = $db->query($perintah);
$table = "";
while($hasil = $kerjakan->fetchArray()){
$table = $hasil;
echo "<button>".$table["sql"]."</button><br/> ";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment