Latest web development tutorials

MySQL PHP Syntax

MySQL can be used in many languages, including PERL, C, C ++, JAVA and PHP. In these languages, Mysql is the most widely used in PHP web development.

In this tutorial, most of the examples we have used PHP language. If you want to know Mysql application in PHP, you can visit our PHP use Mysql introduced .

PHP provides several ways to access and manipulate Mysql database records. PHP Mysql function in the following format:

mysql_function(value,value,...);
Above format function section describes the function mysql functions, such as
mysqli_connect($connect);
mysqli_query($connect,"SQL 语句");
mysql_fetch_array()
mysql_connect()
mysql_close()

The following example shows a PHP function call mysql syntax:

<html>
<head>
<meta charset="utf-8"> 
<title>PHP MySQL</title>
</head>
<body>
<?php
   $retval = mysql_function(value, [value,...]);
   if( !$retval )
   {
       die ( "相关错误信息" );
   }
   // 其他 MySQL 或 PHP 语句
?>
</body>
</html>

From the beginning of the next chapter, we will learn more MySQL performance function.