note 119573 modified in sqlite3.open by cmb
| From: | cmb@php.net | Date: | Sun, 10 Jul 2016 20:04:27 +0000 |
| Subject: | note 119573 modified in sqlite3.open by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-205947@lists.php.net to get a copy of this message | ||
[Editor's note: see <https://www.sqlite.org/backup.html>]
Just a quick note on not being able to open() two databases together and copy the exact info, say
for instance to create a backup db. I searched the net for and answer, none of which served. The
comment and solution of attaching seems complicated to me. Eventually I worked out that the same
result could be more simply accomplished using the copy() function.
<?php
copy("old.db", "new.db");
?>
--was--
Just a quick note on not being able to open() two databases together and copy the exact info, say
for instance to create a backup db. I searched the net for and answer, none of which served. The
comment and solution of attaching seems complicated to me. Eventually I worked out that the same
result could be more simply accomplished using the copy() function.
<?php
copy("old.db", "new.db");
?>
http://php.net/manual/en/sqlite3.open.php