Unix and Linux Discussions Tagged with connection |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
7 |
5,595 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
38,470 |
UNIX for Advanced & Expert Users |
|
|
|
4 |
11,111 |
UNIX for Advanced & Expert Users |
|
|
|
8 |
46,645 |
Solaris |
|
|
|
4 |
3,289 |
UNIX for Beginners Questions & Answers |
|
|
|
5 |
2,918 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
4,920 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
5,652 |
AIX |
|
|
|
4 |
11,841 |
AIX |
|
|
|
4 |
2,900 |
Shell Programming and Scripting |
|
|
|
1 |
15,365 |
Red Hat |
|
|
|
1 |
7,274 |
Shell Programming and Scripting |
|
|
|
2 |
2,752 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
6,701 |
UNIX for Advanced & Expert Users |
|
|
|
0 |
3,905 |
Ubuntu |
|
|
|
1 |
3,414 |
IP Networking |
|
|
|
5 |
5,247 |
IP Networking |
|
|
|
1 |
8,762 |
IP Networking |
|
|
|
4 |
3,219 |
Shell Programming and Scripting |
|
|
|
4 |
8,158 |
Solaris |
|
|
|
0 |
4,185 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
7,988 |
IP Networking |
|
|
|
3 |
8,103 |
BSD |
|
|
|
4 |
7,275 |
Windows & DOS: Issues & Discussions |
|
|
|
1 |
14,769 |
Shell Programming and Scripting |
|
|
|
6 |
14,552 |
Programming |
|
|
|
2 |
6,999 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
3,063 |
Solaris |
|
|
|
7 |
7,396 |
Solaris |
|
|
|
1 |
8,168 |
Solaris |
|
|
|
1 |
8,530 |
Solaris |
|
|
|
1 |
11,457 |
Solaris |
|
|
|
0 |
2,167 |
OS X Support RSS |
|
|
|
3 |
7,232 |
Solaris |
|
|
|
4 |
9,448 |
Solaris |
|
|
|
0 |
2,575 |
OS X Support RSS |
|
|
|
0 |
1,995 |
OS X Support RSS |
|
|
|
3 |
10,997 |
Programming |
|
|
|
7 |
34,434 |
HP-UX |
|
|
|
0 |
3,211 |
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)