dba_insert
PHP Manual
PHP Manual»Функції DBA»dba_insert

dba_insert

(PHP 4, PHP 5, PHP 7, PHP 8)

dba_insertInsert entry

Опис

function dba_insert(string|array $key, string $value, Dba\Connection $dba): bool

dba_insert() inserts the entry described with key and value into the database.

Параметри

key
The key of the entry to be inserted. If this key already exist in the database, this function will fail. Use dba_replace() if you need to replace an existent key.
value
The value to be inserted.
dba
Примірник Dba\Connection, якого повертає функція dba_open() або dba_popen().

Значення, що повертаються

Повертає true у разі успіху або false в разі помилки.

Журнал змін

Версія Опис
8.4.0 Тепер параметр dba має бути примірником Dba\Connection. раніше очікувався дійсний dba resource.

Прогляньте також

To Top