Unix and Linux Discussions Tagged with connection |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
7 |
5,593 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
38,465 |
UNIX for Advanced & Expert Users |
|
|
|
4 |
11,110 |
UNIX for Advanced & Expert Users |
|
|
|
8 |
46,641 |
Solaris |
|
|
|
4 |
3,284 |
UNIX for Beginners Questions & Answers |
|
|
|
5 |
2,915 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
4,920 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
5,648 |
AIX |
|
|
|
4 |
11,840 |
AIX |
|
|
|
4 |
2,900 |
Shell Programming and Scripting |
|
|
|
1 |
15,362 |
Red Hat |
|
|
|
1 |
7,274 |
Shell Programming and Scripting |
|
|
|
2 |
2,752 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
6,699 |
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,184 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
7,987 |
IP Networking |
|
|
|
3 |
8,101 |
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,456 |
Solaris |
|
|
|
0 |
2,166 |
OS X Support RSS |
|
|
|
3 |
7,232 |
Solaris |
|
|
|
4 |
9,447 |
Solaris |
|
|
|
0 |
2,575 |
OS X Support RSS |
|
|
|
0 |
1,995 |
OS X Support RSS |
|
|
|
3 |
10,997 |
Programming |
|
|
|
7 |
34,431 |
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)