sábado, 18 de julho de 2009
Php & Postgres
There are two direct ways to make a connection to PostgreSQL using PHP. They are pg_connect() and pg_pconnect(). The syntax of the two connections is very similar. However, functionally, they are a bit different. The pg_connect() function will create a new connection for each instance of the function. On the other hand, pg_pconnect() will reuse an existing connection to PostgreSQL if one is available.
The following is a simple example of opening a database connection to PostgreSQL:
< ?
// This is an example
$connection = pg_connect("dbname=mydb user=myuser host=localhost");
? >
The following is a simple example of opening a database connection to PostgreSQL:
< ?
// This is an example
$connection = pg_connect("dbname=mydb user=myuser host=localhost");
? >
Assinar:
Postar comentários (Atom)
Um comentário:
Programação é o modo mais simples de mostrar ao computador o que deve ser feito.
01- O que: 02- Como: 03- Quando: 04-Por que:
05- Por onde começar: 06- Quais ferramentas dispor:
06- Qual diretriz seguir. 18/07/09
Postar um comentário