Skip to content

Instantly share code, notes, and snippets.

@malikkurosaki
Created August 6, 2018 03:57
Show Gist options
  • Save malikkurosaki/6a40945a1e88c09edf7778fb64e6263f to your computer and use it in GitHub Desktop.
Save malikkurosaki/6a40945a1e88c09edf7778fb64e6263f to your computer and use it in GitHub Desktop.
sqlite3 insert data into table
<?php
$db = new SQLite3("ayu.db");
$perintah = <<<EOD
INSERT INTO biodata
(nama,email,password,status)
VALUES
("malik","[email protected]","malik","kawin")
EOD;
$laksanakan = $db->exec($perintah);
if(!$laksanakan){
echo $db->lastErrorMsg();
}else{
echo "perintah memasukkan data dilaksanakan";
}
$db->close();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment