Submitted by Kiran on Sun, 02/15/2009 - 16:06
Communicate with PostgreSQL using PHP
PostgreSQL is a common open source relational database system often used by PHP programmers.
Here we will discuss a PHP script to connect, insert data, retrieve data, and close the connection.
Let's create an example table in PostgreSQL and insert some dummy data:
create table example(
id serial,
desc varchar(255) not null,
qty int not null,
primary key(id)
);
insert into example (desc, qty) values ('test1', 10);
insert into example (desc, qty) values ('test2', 1);
insert into example (desc, qty) values ('test3', 2);
»
- Kiran's blog
- Add new comment
- Read more
- 298 reads













