downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

mssql_next_result> <mssql_min_error_severity
[edit] Last updated: Fri, 23 Mar 2012

view this page in

mssql_min_message_severity

(PHP 4, PHP 5, PECL odbtp >= 1.1.1)

mssql_min_message_severityUstawia poziom ważności zwracanych komunikatów o błędach

Opis

void mssql_min_message_severity ( int $poziom ważności )

Ustawia poziom ważności zwracanych komunikatów o błędach

Parametry

poziom ważności

Nowy poziom ważności zwracanych komunikatów o błędach.

Zwracane wartości

Nie jest zwracana żadna wartość.

Przykłady

Przykład #1 Przykład mssql_min_message_severity()

<?php
// Połączenie do MSSQL
mssql_connect('KALLESPC\SQLEXPRESS''sa''phpfi');

// Ustaw poziom ważności zwracanych komunikatów o błędach na 17.
// To nie wywoła żadnego komunikatu o błędzie, gdy przez API
// zostanie wybrana nieistniejąca baza danych
mssql_min_message_severity(17);

// Wybranie nieistniejącej bazy danych
mssql_select_db('THIS_DATABASE_DOES_NOT_EXISTS');
?>

Powyższy przykład wyświetli:

mssql_select_db(): Nie można wybrać bazy danych:  THIS_DATABASE_DOES_NOT_EXISTS



add a note add a note User Contributed Notes mssql_min_message_severity
jotaylor at hightechinstitute dot edu 28-Dec-2006 09:24
The Severity Codes are:

10 - Status Message:Does not raise an error but returns a string.
11, 12, 13 - Not Used
14 - Informational Message
15 - Warning Message
16 - Critical Error: The Procedure Failed
VGR at edainworks dot com 03-Jun-2004 10:53
very useful function to prevent the silly "message: blah blah blah" lines issued by the DB layer.

Just set the level to 17 and mssql_select_db() will (at last) leave you alone ;-)

 
show source | credits | stats | sitemap | contact | advertising | mirror sites