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:

<https://secure.php.net/manual/en/book.sqlite3.php>

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

<https://secure.php.net/manual/en/sqlite3.open.php>

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

<https://secure.php.net/manual/en/function.odbc-connect.php>

for 'read'.

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

Reply via email to