SQLSRV 函数
在线手册:中文  英文

sqlsrv_configure

(No version information available, might only be in SVN)

sqlsrv_configureChanges the driver error handling and logging configurations

说明

bool sqlsrv_configure ( string $setting , mixed $value )

Changes the driver error handling and logging configurations.

参数

setting

The name of the setting to set. The possible values are "WarningsReturnAsErrors", "LogSubsystems", and "LogSeverity".

value

The value of the specified setting. The following table shows possible values:

Error and Logging Setting Options
Setting Options
WarningsReturnAsErrors 1 (TRUE) or 0 (FALSE)
LogSubsystems SQLSRV_LOG_SYSTEM_ALL (-1) SQLSRV_LOG_SYSTEM_CONN (2) SQLSRV_LOG_SYSTEM_INIT (1) SQLSRV_LOG_SYSTEM_OFF (0) SQLSRV_LOG_SYSTEM_STMT (4) SQLSRV_LOG_SYSTEM_UTIL (8)
LogSeverity SQLSRV_LOG_SEVERITY_ALL (-1) SQLSRV_LOG_SEVERITY_ERROR (1) SQLSRV_LOG_SEVERITY_NOTICE (4) SQLSRV_LOG_SEVERITY_WARNING (2)

返回值

成功时返回 TRUE, 或者在失败时返回 FALSE

参见


SQLSRV 函数
在线手册:中文  英文

用户评论:

smhahmadi (2013-01-05 16:23:24)

Performance tip:
Beware of the performance penalty involved with unchecked use of logging options. In my case, although I was using the buffered cursor, sqlsrv_fetch_array was running too slowly. The solution was to remove my lavish use of those configuration options (using both SQLSRV_LOG_SYSTEM_ALL and SQLSRV_LOG_SEVERITY_ALL).

易百教程