PhpDig.net

What is PhpDig?
PhpDig is a PHP MySQL based
Web Spider & Search Engine.




mssql_min_error_severity

Name

mssql_min_error_severity — Sets the minimum level that will return an error from Microsoft SQL Server.

Synopsis

void mssql_min_error_severity(, );
int :
: Minimum error level

Returns

Void

Description

Sets the minimum level at which errors will be displayed. Microsoft SQL Server has two sets of error-reporting functionality. The first reports error levels that relate to errors inside the server itself. In addition, these error levels can be generated programmatically by the user. The other error functionality relates to server messages, and this is handled by the mssql_min_message_severity() function. A good demonstration of this is to set both mssql_min_error_severity() and mssql_min_message_severity() to 1, then attempt to log in using an incorrect username or password. Microsoft SQL Server will report back both a message and an error. The message has a severity level of 14, while the error has a severity level of 2. In both cases, they indicate a user error. More information on these error levels can be found in the Microsoft SQL Server documentation.

This value can also be set in the PHP initialization file.

Example

Example 776. Suppress login error

mssql_min_error_severity(3);
mssql_min_message_severity(17);
$db=mssql_connect("server","sa","wrongpassword") or die("mssql_get_last_message());



PHP Functions Essential Reference. Copyright © 2002 by New Riders Publishing (Authors: Zak Greant, Graeme Merrall, Torben Wilson, Brett Michlitsch). This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org/openpub/). The authors of this book have elected not to choose any options under the OPL. This online book was obtained from http://www.fooassociates.com/phpfer/ and is designed to provide information about the PHP programming language, focusing on PHP version 4.0.4 for the most part. The information is provided on an as-is basis, and no warranty or fitness is implied. All persons and entities shall have neither liability nor responsibility to any person or entity with respect to any loss or damage arising from the information contained in this book.

Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.