Information Needed for MySQL Connection in PHP

Q

What Do You Need to Connect PHP to MySQL in PHP?

✍: FYIcenter.com

A

If you want to access MySQL database server in your PHP script, you need to make sure that MySQL module is installed and turned on in your PHP engine. Check the PHP configuration file, php.ini, to make sure the extension=php_mysql.dll is not commented out.

The MySQL module offers a number of functions to allow you to work with MySQL server. Some commonly used MySQL functions are:

  • mysql_connect -- Open a connection to a MySQL Server
  • mysql_close -- Close MySQL connection
  • mysql_db_query -- Send a MySQL query
  • mysql_fetch_array -- Fetch a result row as an associative array, a numeric array, or both
  • mysql_free_result -- Free result memory
  • mysql_list_tables -- List tables in a MySQL database
  • mysql_list_fields -- List MySQL table fields

 

Working with MySQL Database in PHP

⇒⇒PHP Tutorials

2016-10-20, 247👍, 0💬