I need to use PHP to create a connection to a SQLite database.
Is there a similar call, like this connection to a MySql database?
// Creating a connection
$conn = new mysqli($servername, $username, $password);
Is this the trick?
<?php
class MyDB extends SQLite3 {
function __construct() {
$this->open('test.db');
}
}
$db = new MyDB();
if(!$db) {
echo $db->lastErrorMsg();
} else {
echo "Opened database successfully\n";
}
?>
Open in new window
https://www.tutorialspoint.com/sqlite/sqlite_php.htmThanks.
I think PDO may answer my other question, where I was feeling more unstructured than I prefer to feel...
https://www.experts-exchange.com/questions/29217611/PHP-SQLite-need-function-to-execute-SQL-statement.html