IMPRESS dotted_line CONTACT dotted_line search dotted_line Kontakt dotted_line sitemap dotted_line print
173 PHP-Resource users online

Switch to another languags Deutsch aktuelle Sprache Englisch

- Ad -
php-resource

PHP Manual

Return the port number associated with the connection

pg_port

(PHP 4, PHP 5)

pg_port — Return the port number associated with the connection

Description

int pg_port ([ resource $connection ] )

pg_port() returns the port number that the given PostgreSQL connection resource is connected to.

Parameters

connection

PostgreSQL database connection resource. When connection is not present, the default connection is used. The default connection is the last connection made by pg_connect() or pg_pconnect().

Return Values

An int containing the port number of the database server the connection is to, or FALSE on error.

Examples

Example#1 pg_port() example

<?php
$pgsql_conn 
pg_connect("dbname=mark host=localhost");

if (
$pgsql_conn) {
   print 
"Successfully connected to port: " pg_port($pgsql_conn) . "<br/>\n";
} else {
   print 
pg_last_error($pgsql_conn);
   exit;
}
?>




Comments to the PHP manual
Write new comment
 

webhosting und Server



 

New Tutorial entries

Joomla! Starterhilfe

Dieses Tutorial begleitet Sie bei dem Einstieg in die Welt von dem CMS Joomla!.

werninator | Category: MySQL
Objektorientiertes Programmieren

Dieses Tutorial beschreibt sehr gut die Wirkunsweise von objektorientiertes Programmieren. Also bestens geeignet um das objektorientierte Programmieren zu verstehen.

phpsven | Category: PHP
Tutorials zu Facebook Anwendungen mit PHP

In mehreren Tutorials wird der Zugriff auf Facebook Daten mittels Graph API, FQL und REST API erklärt. Alle Codebeispiele liegen zum Ausprobieren in einem SVN, bzw. github Repository bereit.

abouttheweb | Category: PHP