cubrid_set_autocommit
(PECL CUBRID >= 8.4.0)
cubrid_set_autocommit — Set autocommit mode of the connection
說明
cubrid_set_autocommit(resource
$conn_identifier
, bool $mode
): boolThe cubrid_set_autocommit() function is used to set the CUBRID database auto-commit mode of the current database connection.
In CUBRID PHP, auto-commit mode is disabled by default for transaction management. When auto-commit mode is truned from off to on, any pending work is automatically committed.
參數
-
conn_identifier
-
Connection identifier.
-
mode
-
Auto-commit mode. The following constants can be used:
CUBRID_AUTOCOMMIT_FALSE
CUBRID_AUTOCOMMIT_TRUE
返回值
成功時返回 true
, 或者在失敗時返回 false
。
參見
- cubrid_get_autocommit() - Get auto-commit mode of the connection
- cubrid_commit() - Commit a transaction