mySQL 可应用于多种语言,包括 PERL, C, C++, JAVA 和 PHP,在这些语言中,MySQL 在 PHP 的 web 开发中是应用最广泛。
在本教程中我们大部分实例都采用了 PHP 语言。
PHP 提供了多种方式来访问和操作Mysql数据库记录。PHP mysqli 函数格式如下:
mysqli_function(value,value,...);
以上格式中 function部分描述了mysql函数的功能,如
mysqli_connect($connect);
mysqli_query($connect,"SQL 语句");
mysqli_fetch_array()
mysqli_close()
以下实例展示了PHP调用mysql函数的语法:
实例