bool sqlanywhere_set_option( resource link_identifier, string option, mixed value )
This function is deprecated. You should use the following PHP function instead: sasql_set_option.
Sets the value of the specified option on the specified connection. You can set the value for the following options:
Name | Description | Default |
---|---|---|
auto_commit | When this option is set to on, the database server commits after executing each statement. | on |
row_counts | When this option is set to FALSE, the sqlanywhere_num_rows function returns an estimate of the number of rows affected. If you want to obtain an exact count, set this option to TRUE. | FALSE |
verbose_errors | When this option is set to TRUE, the PHP driver returns verbose errors. When this option is set to FALSE, you must call the sqlanywhere_error or sqlanywhere_errorcode functions to get further error information. | TRUE |
You can change the default value for an option by including the following line in the php.ini file. In this example, the default value is set for the auto_commit option.
sqlanywhere.auto_commit=0 |
link_identifier The link identifier returned by the sqlanywhere_connect function.
option The name of the option you want to set.
value The new option value.
TRUE on success or FALSE on failure.
The following examples show the different ways you can set the value of the auto_commit option.
$result = sqlanywhere_set_option( $conn, "auto_commit", "Off" ); |
$result = sqlanywhere_set_option( $conn, "auto_commit", 0 ); |
$result = sqlanywhere_set_option( $conn, "auto_commit", False ); |
Discuss this page in DocCommentXchange.
|
Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |