PHP Programming/PostgreSQL

From Wikibooks, open books for an open world
Jump to: navigation, search

[edit] PostgreSQL

PostgreSQL is another popular database you can use with PHP.

The basic syntax of PostgreSQL is the same as that of MySQL, although some functions have been renamed:

  • mysqli_connect becomes pg_connect
  • mysql_select_db is deprecated; it is specified in the pg_connect syntax
  • mysqli_query becomes pg_query
  • mysql_error becomes pg_last_error
  • mysql_close becomes pg_close
  • mysql_fetch_assoc becomes pg_fetch_assoc
  • mysql_free_result becomes pg_free_result

[edit] For More Information

Personal tools
Namespaces
Variants
Actions
Navigation
Community
Toolbox
Sister projects
Print/export