Since PostgreSQL is based on a client/server principle, applications must first connect or `bind' to the server before being able to interact with it.
This short script connects to a PostgreSQL database called `phphh' with username `postgres'. Note that pg_conneet() takes a single argument, a connection string, which consists of name=value pairs, in much the same way that PHP takes URL encoded arguments. In the case of the pg_connect() connection string, the delimiter is a space, not an ampersand. Other valid connection string names include:
host -- an optional host name for the database port -- an optional port number for the database …
Комментариев нет:
Отправить комментарий