Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://oit.cmc.msu.ru/php/function.sesam-settransaction.html
Дата изменения: Sun Feb 3 22:54:34 2002 Дата индексирования: Mon Oct 1 22:19:09 2012 Кодировка: |
Returns: TRUE if the values are valid, and the settransaction() operation was successful, FALSE otherwise.
sesam_settransaction() overrides the default values for the "isolation level" and "read-only" transaction parameters (which are set in the SESAM configuration file), in order to optimize subsequent queries and guarantee database consistency. The overridden values are used for the next transaction only.
sesam_settransaction() can only be called before starting a transaction, not after the transaction has been started already.
To simplify the use in php scripts, the following constants have been predefined in php (see SESAM handbook for detailed explanation of the semantics):
Table 1. Valid values for "Isolation_Level" parameter
Value | Constant | Meaning |
---|---|---|
1 | SESAM_TXISOL_READ_UNCOMMITTED | Read Uncommitted |
2 | SESAM_TXISOL_READ_COMMITTED | Read Committed |
3 | SESAM_TXISOL_REPEATABLE_READ | Repeatable Read |
4 | SESAM_TXISOL_SERIALIZABLE | Serializable |
Table 2. Valid values for "Read_Only" parameter
Value | Constant | Meaning |
---|---|---|
0 | SESAM_TXREAD_READWRITE | Read/Write |
1 | SESAM_TXREAD_READONLY | Read-Only |
The values set by sesam_settransaction() will override the default setting specified in the SESAM configuration file.