I use PDO to access two SQLite 3 databases in PHP. I want to switch database files during a query by renaming them, but I cannot do this while the files are open, as it gives an error that the file is being used by another process. I tried to disconnect persistent connections and set the descriptors to null, but it does not work.
Is there no way to close the PDO descriptor and release the lock in the database file?
source
share