Re: [sqlite] Opening and closing an SQLITE3 db in PHP

2014-03-19 Thread Tim Streater
On 19 Mar 2014 at 12:45, Simon Slavin wrote: > On 19 Mar 2014, at 11:21am, Tim Streater wrote: > >> So I could do: $dbh = new sqlite3 ($dbname, SQLITE_OPEN_READONLY); ?? > > Yes. I think that's the way you're meant to do it if you really do want >

Re: [sqlite] Opening and closing an SQLITE3 db in PHP

2014-03-19 Thread Simon Slavin
On 19 Mar 2014, at 11:21am, Tim Streater wrote: > So I could do: $dbh = new sqlite3 ($dbname, SQLITE_OPEN_READONLY); ?? Yes. I think that's the way you're meant to do it if you really do want readonly. > 3) Is the lock always released if I do $dbh->close(); ? > >>

Re: [sqlite] Opening and closing an SQLITE3 db in PHP

2014-03-19 Thread Tim Streater
On 19 Mar 2014 at 00:53, Simon Slavin wrote: >> 1) I start with $dbh = new sqlite3 ($dbname); Am I right in thinking that >> this does not explicitly open the db (and hence acquire a lock), but that the >> db is opened and the default lock (SQLITE_OPEN_READWRITE | >>

Re: [sqlite] Opening and closing an SQLITE3 db in PHP

2014-03-19 Thread Dan Kennedy
On 03/19/2014 06:49 AM, Tim Streater wrote: Part of my app will, at user request, read some data from an SQLite db and also some files from disk, and send it all out on the network. This may in some cases take several minutes, at the end of which the db gets updated here and there. While this

Re: [sqlite] Opening and closing an SQLITE3 db in PHP

2014-03-18 Thread Simon Slavin
On 18 Mar 2014, at 11:49pm, Tim Streater wrote: > I'm using PHP's sqlite3 class rather than PDO, and I've done nothing explicit > about the journal mode. Good. From PHP using sqlite3 is more efficient and leads to simpler programming than using the PDO. > My

Re: [sqlite] Opening and closing an SQLITE3 db in PHP

2014-03-18 Thread mm.w
Hello, you should ask that on the php stream, they would probably know better about their wrapper implementation. try catching up with Ilia. Best Regards On Tue, Mar 18, 2014 at 4:49 PM, Tim Streater wrote: > Part of my app will, at user request, read some data from an

[sqlite] Opening and closing an SQLITE3 db in PHP

2014-03-18 Thread Tim Streater
Part of my app will, at user request, read some data from an SQLite db and also some files from disk, and send it all out on the network. This may in some cases take several minutes, at the end of which the db gets updated here and there. While this is happening, the user may wish to do another