Re: [sqlite] SQLITE_OPEN_READONLY in PHP

2018-10-21 Thread p...@geniais.com

Thanks to Simon Slavin and Tim Streater
All replies works fine.
Thank you very much
Ismael

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLITE_OPEN_READONLY in PHP

2018-10-20 Thread Tim Streater
On 20 Oct 2018, at 17:05, "p...@geniais.com"  wrote:

> I'm using a C compiled program to write exclusively to a database, and a php
> script for reading only (that communicates via socket).
> I know I can use sqlite3_open_v2() with SQLITE_OPEN_READONLY in C, but there
> is a way to open a database for readonly in php (since just one C program is
> used for writing)?

Try:

http://www.php.net/manual/en/sqlite3.open.php

and look at the flags available.


-- 
Cheers  --  Tim
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLITE_OPEN_READONLY in PHP

2018-10-20 Thread Simon Slavin
On 20 Oct 2018, at 5:05pm, p...@geniais.com wrote:

> I'm using a C compiled program to write exclusively to a database, and a php 
> script for reading only (that communicates via socket).
> I know I can use sqlite3_open_v2() with SQLITE_OPEN_READONLY in C, but there 
> is a way to open a database for readonly in php (since just one C program is 
> used for writing)?

If you need sqlite3 features in PHP then you should to be using the SQLite3 
library in PHP rather than the normal database module:



If you're using this you can indeed use SQLITE_OPEN_READONLY:



If instead you're using the ODBC engine-agnostic library you can also specify 
readonly, though it is more difficult.  Search this page



for 'read'.

Simon.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users