The four statement for connecting to the mysql database using php are

  1. mysql_connect()  to connect to the server
  2. mysql_select_db()   selects the specific data base to connect to
  3. mysql_query()    sends and sql statement to the server
  4. mysql_fetch_array()  returns the data from the server

One can also use mysqli commands which allows one to one more then one database at a time. The mysqli are the improved mysql functions.  They have more capability then the start mysql functions such as with mysqli you can open more then one database at a time where with mysql you can open only one database at a time.

Comments (0)

500 characters remaining

Cancel or