When you talk about PHP and databases, people tend to assumeyou're talking about MySQL. But hang on to your horses - difficultthough it may be to believe, PHP does include support for a number ofother databases. One of them is PostgreSQL, the *other* open-sourcedatabase - and this article tells you everything you need to know aboutusing it with PHP.
And that's about all for the moment. In this article, you learned how to use PHP to communicate with that other open-source RDBMS, PostgreSQL, applying PHP's built-in functions to extract and insert data into a PostgreSQL table. In addition to learning a number of different techniques to extract data, you also got a quick tour of how to use transactions with PostgreSQL, and of the error-handling functions available to help you debug your PHP/PostgreSQL scripts.
Needless to say, there's a lot more you can do with PostgreSQL - this article merely covered the basics. If you're interested in learning more about PostgreSQL features, and in the PHP functions that can be used to avail of those features, take a look at the links below.
Note: All examples in this article have been tested on Linux/i586 with PostgreSQL 7.1, Apache 1.3.20 and PHP 4.2.0RC2. Examples are illustrative only, and are not meant for a production environment. Melonfire provides no warranties or support for the source code described in this article. YMMV!