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

О проекте

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

MySQL

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

Хостинг

Другое








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

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

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

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

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

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

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

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

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

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

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

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



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





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

pg_get_notify

(PHP 4 >= 4.3.0, PHP 5)

pg_get_notify -- Gets SQL NOTIFY message

Описание

array pg_get_notify ( resource connection [, int result_type] )

pg_get_notify() gets notifications generated by a NOTIFY SQL command. To receive notifications, the LISTEN SQL command must be issued.

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

connection

PostgreSQL database connection resource.

result_type

An optional parameter that controls how the returned array is indexed. result_type is a constant and can take the following values: PGSQL_ASSOC, PGSQL_NUM and PGSQL_BOTH. Using PGSQL_NUM, pg_get_notify() will return an array with numerical indices, using PGSQL_ASSOC it will return only associative indices while PGSQL_BOTH, the default, will return both numerical and associative indices.

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

An array containing the NOTIFY message name and backend PID. Otherwise if no NOTIFY is waiting, then FALSE is returned.

Примеры

Пример 1. PostgreSQL NOTIFY message

<?php
$conn
= pg_pconnect("dbname=publisher");
if (!
$conn) {
  echo
"An error occured.\n";
  exit;
}

// Listen 'author_updated' message from other processes
pg_query($conn, 'LISTEN author_updated;');
$notify = pg_get_notify($conn);
if (!
$notify) {
  echo
"No messages\n";
} else {
  
print_r($notify);
}
?>

Смотрите также

pg_get_pid()



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





Copyright © 2005-2016 Project.Net.Ru