PHP provides very simple commands to connect, fetch or execute query against MYSQL database. The following are as common commands.
* mysql_connect(). Opens a connection to the MYSQL server. The input to this command is the database hostname, username, and password.
* mysql_select_db(). Selects a database on the MYSQL server. The input to this command is the database name.
* mysql_query(). Issues the SQL statement. The input to this command is the sql statement to execute.
* mysql_fetch_array(). Converts an SQL statement result row in an array.The input to this command is the sql result returned by mysql_query method.
* mysql_result(). Gets single element result data from a successful query.
* mysql_error(). Returns a string representation of the error message as returned from MySQL.