May 15, 2021 MySQL
MySQL can be used in many languages, including PERL, C, C, JAVA, and PHP. Of these languages, MySQL is the most widely used in PHP web development.
Most of our examples in this tutorial are in PHP. I f you want to learn about MySQL's application in PHP, you can visit our PHP Using MySQL introduction.
PHP provides a variety of ways to access and manipulate MySQL database records.
The PHP
Mysqli
in the following format:
mysqli_function(value,value,...);
The function section in the above format describes the functionality of mySQL functions, such as
mysqli_connect($connect);
mysqli_query($connect,"SQL 语句");
mysqli_fetch_array()
mysqli_close()
The following example shows the syntax of PHP calling mySQL functions:
<?php
$retval = mysqli_function(value, [value,...]);
if( !$retval )
{
die ( "相关错误信息" );
}
// 其他 MySQL 或 PHP 语句
?>
Starting with the next chapter, we'll learn more about MySQL functional functions.