I have used php PDO for sqlite3 database. This database access multiple application so I have applied WAL mode in sqlite3 database.
My problem is that I have one php file, it run infinite in backend for insert/update data in sqlite3. its works fine but sqlite3 create temp file for -WAL mode (databasename-wal). But -wal file size is increase constantly , How to commit the -WAL File data into main database file.
I have Tried below code for this issue, but it will not workin.
try {
$dbhandle = new PDO("sqlite:".SQLITE_DB_PATH.DBNAME);
return $dbhandle;
} catch (PDOException $e) {
/*echo 'Connection failed: ' . $e->getMessage();
exit;*/
}
$dbhandle->beginTransaction();
$dbhandle->query($query);
$dbhandle->commit();
$dbhandle=null;