Unix and Linux Discussions Tagged with connection |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
7 |
4,509 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
31,857 |
UNIX for Advanced & Expert Users |
|
|
|
4 |
10,164 |
UNIX for Advanced & Expert Users |
|
|
|
8 |
36,396 |
Solaris |
|
|
|
4 |
2,738 |
UNIX for Beginners Questions & Answers |
|
|
|
5 |
2,160 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
4,204 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
4,496 |
AIX |
|
|
|
4 |
10,862 |
AIX |
|
|
|
4 |
2,272 |
Shell Programming and Scripting |
|
|
|
1 |
13,697 |
Red Hat |
|
|
|
1 |
6,558 |
Shell Programming and Scripting |
|
|
|
2 |
2,432 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
5,166 |
UNIX for Advanced & Expert Users |
|
|
|
0 |
3,554 |
Ubuntu |
|
|
|
1 |
3,057 |
IP Networking |
|
|
|
5 |
4,870 |
IP Networking |
|
|
|
1 |
8,123 |
IP Networking |
|
|
|
4 |
2,882 |
Shell Programming and Scripting |
|
|
|
4 |
7,675 |
Solaris |
|
|
|
0 |
3,589 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
7,684 |
IP Networking |
|
|
|
3 |
7,723 |
BSD |
|
|
|
4 |
6,774 |
Windows & DOS: Issues & Discussions |
|
|
|
1 |
14,375 |
Shell Programming and Scripting |
|
|
|
6 |
13,891 |
Programming |
|
|
|
2 |
6,438 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
2,775 |
Solaris |
|
|
|
7 |
6,888 |
Solaris |
|
|
|
1 |
7,701 |
Solaris |
|
|
|
1 |
8,088 |
Solaris |
|
|
|
1 |
11,042 |
Solaris |
|
|
|
0 |
1,971 |
OS X Support RSS |
|
|
|
3 |
6,943 |
Solaris |
|
|
|
4 |
9,203 |
Solaris |
|
|
|
0 |
2,259 |
OS X Support RSS |
|
|
|
0 |
1,782 |
OS X Support RSS |
|
|
|
3 |
10,536 |
Programming |
|
|
|
7 |
33,840 |
HP-UX |
|
|
|
0 |
2,988 |
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)