PHP is a scripting language used for building dynamic web pages. It contains a number of advanced features that rival commercial options such as ASP and ColdFusion.

It contains several built-in database interfaces, including functions specific for communicating with both MySQL and PostgreSQL. The following is a list of the functions specific to PostgreSQL:

  • pg_close(connection_id) 

    Description: Closes a PostgreSQL connection. Returns false if not a valid connection; otherwise, returns true.

  • pg_cmdtuples(result_id) 

    Description: Returns the number of instances affected by an INSERT, UPDATE, or DELETE query. If no tuple was affected, the function will return 0.

  • pg_connect([host], [port], [options], [tty], dbname) 
  • Description: Opens a connection ...

Get PostgreSQL Essential Reference now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.