Home arrow PHP arrow Page 9 - PHP and PostgreSQL

Surfing The Web - PHP

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.

TABLE OF CONTENTS:
  1. PHP and PostgreSQL
  2. Getting Started
  3. First Steps
  4. Digging Deeper
  5. Different Strokes
  6. Rolling Around
  7. Catching Mistakes
  8. A Well-Formed Idea
  9. Surfing The Web
By: Vikram Vaswani, (c) Melonfire
Rating: starstarstarstarstar / 52
May 01, 2002

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement
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.

The PHP manual page for PostgreSQL functions, at http://www.php.net/manual/en/ref.pgsql.php

The PostgreSQL documentation, at http://www.postgresql.org/idocs/

O'Reilly's article on PHP and PostgreSQL, at http://www.onlamp.com/pub/a/onlamp/2002/01/24/postgresql.html


And until next time....stay healthy!

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!

 
 
>>> More PHP Articles          >>> More By Vikram Vaswani, (c) Melonfire
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PHP ARTICLES

- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: