mysql_info
Get the latest query information.
Function name: mysql_info()
Applicable version: PHP 5.2.0 and above
Function description: The mysql_info() function returns additional information for the last executed SQL statement.
Syntax: string mysql_info ([ resource $link_identifier = NULL ] )
parameter:
Return Value: Returns a string containing additional information about the last executed SQL statement.
Example:
<?php // 创建连接$link = mysql_connect('localhost', 'username', 'password'); // 选择数据库mysql_select_db('database', $link); // 执行SQL查询$result = mysql_query("SELECT * FROM users", $link); // 获取SQL语句的额外信息$info = mysql_info($link); echo "最后一次执行的SQL语句的额外信息:".$info; // 关闭连接mysql_close($link); ?>
Output: Additional information for the last executed SQL statement: Records: 10 Duplicates: 0 Warnings: 0
Notes: