Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Function Reference : SESAM Database Functions : sesam_settransaction

sesam_settransaction

Set SESAM transaction parameters ()
bool sesam_settransaction ( int isolation_level, int read_only )

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. See the SESAM handbook for detailed explanation of the semantics.

This function can only be called before starting a transaction, not after the transaction has been started already.

The values set by sesam_settransaction() will override the default setting specified in the SESAM configuration file.

Parameters

isolation_level

Table 289.  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


read_only

Table 290.  Valid values for read_only parameter

Value Constant Meaning
0 SESAM_TXREAD_READWRITE Read/Write
1 SESAM_TXREAD_READONLY Read-Only


Return Values

Returns TRUE if the values are valid, and the settransaction operation was successful, FALSE otherwise.

Examples

Example 2218. Setting SESAM transaction parameters

<?php
sesam_settransaction
(SESAM_TXISOL_REPEATABLE_READ,
                   
SESAM_TXREAD_READONLY);
?>


Change Language


Follow Navioo On Twitter
sesam_affected_rows
sesam_commit
sesam_connect
sesam_diagnostic
sesam_disconnect
sesam_errormsg
sesam_execimm
sesam_fetch_array
sesam_fetch_result
sesam_fetch_row
sesam_field_array
sesam_field_name
sesam_free_result
sesam_num_fields
sesam_query
sesam_rollback
sesam_seek_row
sesam_settransaction
eXTReMe Tracker