П О Р Т А Л                            
С Е Т Е В Ы Х                          
П Р О Е К Т О В                        
  
Поиск по сайту:
                                                 
Главная

О проекте

Web-мастеру
     HTML & JavaScript
     SSI
     Perl
     PHP
     XML & XSLT
     Unix Shell

MySQL

Безопасность

Хостинг

Другое








Самое читаемое:

Учебник PHP - "Для Чайника".
Просмотров 3493 раз(а).

Иллюстрированный самоучитель по созданию сайтов.
Просмотров 6092 раз(а).

Учебник HTML.
Просмотров 3257 раз(а).

Руководство по PHP5.
Просмотров 5483 раз(а).

Хостинг через призму DNS.
Просмотров 4118 раз(а).

Подборка текстов стандартных документов.
Просмотров 55758 раз(а).

Учебник PHP - Самоучитель
Просмотров 3073 раз(а).

Документация на MySQL (учебник & справочное руководство)
Просмотров 5301 раз(а).

Внешние атаки...
Просмотров 3815 раз(а).

Учебник PHP.
Просмотров 2815 раз(а).

SSI в примерах.
Просмотров 37450 раз(а).



 
 
| Добавить в избранное | Сделать стартовой | Помощь





Руководство по PHP
Пред. След.

db2_conn_errormsg

(PECL)

db2_conn_errormsg --  Returns the last connection error message and SQLCODE value

Описание

string db2_conn_errormsg ( [resource connection] )

db2_conn_errormsg() returns an error message and SQLCODE value representing the reason the last database connection attempt failed. As db2_connect() returns FALSE in the event of a failed connection attempt, do not pass any parameters to db2_conn_errormsg() to retrieve the associated error message and SQLCODE value.

If, however, the connection was successful but becomes invalid over time, you can pass the connection parameter to retrieve the associated error message and SQLCODE value for a specific connection.

Список параметров

connection

A connection resource associated with a connection that initially succeeded, but which over time became invalid.

Возвращаемые значения

Returns a string containing the error message and SQLCODE value resulting from a failed connection attempt. If there is no error associated with the last connection attempt, db2_conn_errormsg() returns an empty string.

Примеры

Пример 1. Retrieving the error message returned by a failed connection attempt

The following example demonstrates how to return an error message and SQLCODE value after deliberately passing invalid parameters to db2_connect().

<?php
$conn
= db2_connect('badname', 'baduser', 'badpassword');
if (!
$conn) {
    print
db2_conn_errormsg();
}
?>

Результат выполнения данного примера:

[IBM][CLI Driver] SQL1013N  The database alias name
or database name "BADNAME" could not be found.  SQLSTATE=42705
 SQLCODE=-1013



Если Вы не нашли что искали, то рекомендую воспользоваться поиском по сайту:
 





Copyright © 2005-2016 Project.Net.Ru