MySQL works very well with various programming languages ​​such as C, C ++, PHP, and JAVA; out of these languages, PHP and MySQL are considered the perfect combination for developing web applications.

PHP provides various functions to access the MySQL database and to handle data records inside the MySQL database. You can call PHP MySQL functions, like any other PHP function.

Here, in the example below, a connection is established between PHP and MySQL:


$con = mysqli_connect("localhost", "users_name", "user_pass", "db_name");

/* Select queries return a resultset */
  if ($result = mysqli_query($con, "SELECT Name FROM users")) {
  printf("Select returned %d rows.\n", mysqli_num_rows($result));

The following tutorial will guide you on how to use other PHP MySQL functions.

Found This Page Useful? Share It!
Get the Latest Tutorials and Updates
Join us on Telegram