php resource centre

  • about
  • articles
  • tutorials
  • resources
  • certification
Home

Primary links

  • About
  • Articles
  • Tutorials
  • Resources
  • Certification

Common DB Functions(MySql)

admin — Tue, 29/08/2006 - 10:49pm

The MySQL® database has become the world's most popular open source database because of its consistent fast performance, high reliability and ease of use. It's used in more than 6 million installations ranging from large corporations to specialized embedded applications on every continent in the world.

PHP provides support for MySQL through an array of functions that can be used to manipulate MySQL data. The purpose of this tutorial is to introduce those functions commonly used in PHP data-driven applications for retrieving, updating, inserting, and deleting data.

The common PHP MySQL functions are described below:



mysql_connect(MySQL server name,username,password) - opens a connection to a MySQL server.

mysql_select_db(database name,connection identifier) - selects a database residing on the MySQL server. The database name parameter referes to an active database on the MySQL server that was opened with the mysql_connect function. The connection identifier is a reference to the current MySQL connection.

mysql_query(sql query) - sends a query to the currently active database.

mysql_fetch_array(resourse result) - Returns an array that corresponds to the fetched row and moves the internal data pointer ahead.

mysql_affected_rows(resourse result) - determines the number of rows affected by the previous SQL operation.

mysql_close(link_identifier) - closes MySQL connection.
  • Tutorials
  • Login to post comments

User login

  • Request new password

Follow Us

Who's online

There are currently 0 users and 1 guest online.

Who's new

  • Nisha
  • linnaeus
  • Yameen
  • TalleyReedy
  • admin

Follow vipin7873 on Twitter

<!-- Start of Woopra Code -->

<!-- End of Woopra Code -->

  • about
  • articles
  • tutorials
  • resources
  • certification

copyright © 2010 Vipin Chandran