Created
August 7, 2018 07:55
-
-
Save malikkurosaki/db804ab12116d19a8f5f178fb6b48367 to your computer and use it in GitHub Desktop.
sqlite3 return collumn name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$db = new SQLite3("mydb.db"); | |
$perintah = <<<AOD | |
SELECT name FROM sqlite_master | |
AOD; | |
$lakukan = $db->query($perintah); | |
while($data = $lakukan->fetchArray()){ | |
//echo $data["name"]." | "; | |
} | |
$perintah2 = <<<AOD | |
PRAGMA table_info(biodata) | |
AOD; | |
$lakukan2 = $db->query($perintah2); | |
while($data2 = $lakukan2->fetchArray()){ | |
echo $data2["name"]." | "; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment