ConFoo: Call for paper is now Open

SQLite3::busyTimeout

(PHP 5 >= 5.3.3)

SQLite3::busyTimeoutEstablecer el gestor de conexión ocupado

Descripción

public bool SQLite3::busyTimeout ( int $msecs )

Establece un gestor ocupado que estará dormido hasta que la base de datos no esté bloqueada o se alcance el tiempo de espera.

Parámetros

msecs

Los milisegundos a dormir. Establecer este valor a un valor menor o igual a cero desactivará un gestor de tiempo de espera ya establecido.

Valores devueltos

Devuelve TRUE en caso de éxito,FALSE en case de fallo.

add a note add a note

User Contributed Notes 1 note

up
1
ppryor63 at gmail dot com
7 months ago
The busyTimeout() method and related API sqlite3_busy_timeout() is a connection level attribute and affects whole connection and should be set once after opening connection.  Do not set to zero or you will encounter "Database is busy" error message when calling query, querySingle, prepare, or execute methods.  Also ensure that sqlite3 library is compiled with HAVE_USLEEP defined, otherwise busyTimeout() can only time out in seconds.  It is very highly recommended to call busyTimeout() with non-zero timeout for reliability in concurrent environment.
To Top