<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Poll the status of an in-progress asynchronous PostgreSQL connection attempt</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.pg-close.html">pg_close</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.pg-connect.html">pg_connect</a></div> <div class="up"><a href="ref.pgsql.html">PostgreSQL Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.pg-connect-poll" class="refentry"> <div class="refnamediv"> <h1 class="refname">pg_connect_poll</h1> <p class="verinfo">(PHP 5 >= 5.6.0, PHP 7)</p><p class="refpurpose"><span class="refname">pg_connect_poll</span> — <span class="dc-title"> Poll the status of an in-progress asynchronous PostgreSQL connection attempt </span></p> </div> <div class="refsect1 description" id="refsect1-function.pg-connect-poll-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">int</span> <span class="methodname"><strong>pg_connect_poll</strong></span> ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$connection</code></span> )</div> <p class="para rdfs-comment"> <span class="function"><strong>pg_connect_poll()</strong></span> polls the status of a PostgreSQL connection created by calling <span class="function"><a href="function.pg-connect.html" class="function">pg_connect()</a></span> with the <strong><code>PGSQL_CONNECT_ASYNC</code></strong> option. </p> </div> <div class="refsect1 parameters" id="refsect1-function.pg-connect-poll-parameters"> <h3 class="title">Parameters</h3> <dl> <dt> <code class="parameter">connection</code></dt> <dd> <p class="para"> PostgreSQL database connection resource. </p> </dd> </dl> </div> <div class="refsect1 returnvalues" id="refsect1-function.pg-connect-poll-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns <strong><code>PGSQL_POLLING_FAILED</code></strong>, <strong><code>PGSQL_POLLING_READING</code></strong>, <strong><code>PGSQL_POLLING_WRITING</code></strong>, <strong><code>PGSQL_POLLING_OK</code></strong>, or <strong><code>PGSQL_POLLING_ACTIVE</code></strong>. </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.pg-close.html">pg_close</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.pg-connect.html">pg_connect</a></div> <div class="up"><a href="ref.pgsql.html">PostgreSQL Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>