PHP.mk документација

SQLite3::busyTimeout

Почист и полокален преглед на PHP референцата, со задржана структура од PHP.net и подобра читливост за примери, секции и белешки.

sqlite3.busytimeout.php PHP.net прокси Преводот се освежува
Оригинал на PHP.net
Патека sqlite3.busytimeout.php Локална патека за оваа страница.
Извор php.net/manual/en Оригиналниот HTML се реупотребува и локално се стилизира.
Режим Прокси + превод во позадина Кодовите, табелите и белешките остануваат читливи во истиот тек.
SQLite3::busyTimeout

Референца за `sqlite3.busytimeout.php` со подобрена типографија и навигација.

sqlite3.busytimeout.php

SQLite3::busyTimeout

(PHP 5 >= 5.3.3, PHP 7, PHP 8)

SQLite3::busyTimeoutSets the busy connection handler

= NULL

public SQLite3::busyTimeout(int $milliseconds): bool

Sets a busy handler that will sleep until the database is not locked or the timeout is reached.

Параметри

milliseconds

The milliseconds to sleep. Setting this value to a value less than or equal to zero, will turn off an already set timeout handler.

Вратени вредности

Патеката до PHP скриптата што треба да се провери. true при успех, или false при неуспех.

Белешки од корисници 3 белешки

ppryor63 at gmail dot com
12 години пред
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.
anthony at domps dot fr
пред 4 години
It's possible to use PRAGMA to set busyTimeout (milliseconds) :

<?php

$db = new SQLite3('my.db');
$db->exec("PRAGMA busy_timeout=5000");

?>
dkarnout at gmail dot com
пред 10 години
For SQLite2 (http://php.net/manual/en/function.sqlite-busy-timeout.php), PHP sets the default busy timeout to be 60 seconds when the database is opened.
However, this does not happen for v3 and it has to be done manually.

My personal experience is that the default value of SQLite3, which is 0, is not enough when you have to do consecutive read/write commits and the file has not been accessed for long time.
На оваа страница

Автоматски outline од активната документација.

Насловите ќе се појават тука по вчитување.

Попрегледно читање

Примерите, changelog табелите и user notes се визуелно издвоени за да не се губат во долгата содржина.

Брз совет Користи го outline-от Скокни директно на главните секции од активната страница.
Извор Оригиналниот линк останува достапен Кога ти треба целосен upstream context, отвори го PHP.net во нов tab.