PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<pg_get_notifypg_get_result>
Last updated: Mon, 16 Jul 2012

pg_get_pid

(PHP 4 >= 4.3.0, PHP 5)

pg_get_pid -- Ping 数据库连接

说明

int pg_get_pid ( resource connection )

pg_get_pid() 取得后端(数据库服务器进程)的 PID。PID 用来检查其它进程是否发送了 NOTIFY 消息。

例子 1. PostgreSQL 后端 PID

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

// Backend process PID. Use PID with pg_get_notify()
$pid = pg_get_pid($conn);
?>

参见 pg_get_notify()




<pg_get_notifypg_get_result>
 Last updated: Mon, 16 Jul 2012
 
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://manual.phpv.net/
Last updated: Thu Jul 7 19:13:47 2005 CST