Unix and Linux Discussions Tagged with connection |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
7 |
5,549 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
38,398 |
UNIX for Advanced & Expert Users |
|
|
|
4 |
11,083 |
UNIX for Advanced & Expert Users |
|
|
|
8 |
46,531 |
Solaris |
|
|
|
4 |
3,249 |
UNIX for Beginners Questions & Answers |
|
|
|
5 |
2,895 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
4,895 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
5,607 |
AIX |
|
|
|
4 |
11,813 |
AIX |
|
|
|
4 |
2,893 |
Shell Programming and Scripting |
|
|
|
1 |
15,278 |
Red Hat |
|
|
|
1 |
7,264 |
Shell Programming and Scripting |
|
|
|
2 |
2,745 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
6,668 |
UNIX for Advanced & Expert Users |
|
|
|
0 |
3,893 |
Ubuntu |
|
|
|
1 |
3,408 |
IP Networking |
|
|
|
5 |
5,241 |
IP Networking |
|
|
|
1 |
8,744 |
IP Networking |
|
|
|
4 |
3,214 |
Shell Programming and Scripting |
|
|
|
4 |
8,146 |
Solaris |
|
|
|
0 |
4,165 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
7,981 |
IP Networking |
|
|
|
3 |
8,088 |
BSD |
|
|
|
4 |
7,262 |
Windows & DOS: Issues & Discussions |
|
|
|
1 |
14,766 |
Shell Programming and Scripting |
|
|
|
6 |
14,541 |
Programming |
|
|
|
2 |
6,979 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
3,058 |
Solaris |
|
|
|
7 |
7,384 |
Solaris |
|
|
|
1 |
8,160 |
Solaris |
|
|
|
1 |
8,521 |
Solaris |
|
|
|
1 |
11,450 |
Solaris |
|
|
|
0 |
2,165 |
OS X Support RSS |
|
|
|
3 |
7,222 |
Solaris |
|
|
|
4 |
9,442 |
Solaris |
|
|
|
0 |
2,567 |
OS X Support RSS |
|
|
|
0 |
1,990 |
OS X Support RSS |
|
|
|
3 |
10,983 |
Programming |
|
|
|
7 |
34,422 |
HP-UX |
|
|
|
0 |
3,208 |
OS X Support RSS |
PG_HOST(3) PG_HOST(3)
pg_host - Returns the host name associated with the connection
SYNOPSIS
string pg_host ([resource $connection])
DESCRIPTION
pg_host(3) returns the host name of the given PostgreSQL $connection resource is connected to.
PARAMETERS
o $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(3) or pg_pconnect(3).
RETURN VALUES
A string containing the name of the host the $connection is to, or FALSE on error.
EXAMPLES
Example #1
pg_host(3) example
<?php
$pgsql_conn = pg_connect("dbname=mark host=localhost");
if ($pgsql_conn) {
print "Successfully connected to: " . pg_host($pgsql_conn) . "<br/>
";
} else {
print pg_last_error($pgsql_conn);
exit;
}
?>
SEE ALSO
pg_connect(3), pg_pconnect(3).
PHP Documentation Group PG_HOST(3)