Home >Database >Mysql Tutorial >10 recommended articles about mysql_free_result

10 recommended articles about mysql_free_result

怪我咯
怪我咯Original
2017-06-13 09:43:451626browse

mysql_free_result() only needs to be called when considering how much memory will be used when returning a large result set. All associated memory will be automatically released after the script ends. It is a good habit to release the cursor memory after we execute the SELECT statement. . Memory release can be achieved through the PHP function mysql_free_result(). //Define header file, character format header("Content-type:text/html;charset=utf-8"); error_reporting(ERR_ALL & ~ E_NOTICE); ​ //Define local server connection information $servername="localhost"; $username="root"; $password="admin"; $dbname="test"

1. PHP mysqli_free_result() and mysqli_fetch_array() functions

Introduction: mysql_free_result() only Need to be called when considering how much memory will be used when returning a large result set. All associated memory will be automatically released after the script ends. After we execute the SELECT statement, it is a good habit to release the cursor memory. . Memory release can be achieved through the PHP function mysql_free_result().

2. MySQL data table is damaged PHP gets the implementation code of all tables in the MySQL database

Introduction: MySQL data Table damage: MySQL data table is damaged PHP Get the implementation code of all tables in the MySQL database: Copy the code as follows: function list_tables($database) { $rs = mysql_list_tables($database); $tables = array(); while ($row = mysql_fetch_row($rs)) { $tables[] = $row[0]; } mysql_free_result($rs); return $tables;

3. Warning: mysql_free_result ():_PHP Tutorial

Introduction: Warning: mysql_free_result():. Our website prompts such an error, Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource. There are three situations below: The parameters of mysql_free_result are incorrect.

4. php-PHP issues with releasing resource data types

Introduction: PHP Warning: mysql_free_result() expects parameter 1 to be resource, boolean given in D:freehostwuxiaotaowebluntanedit_update.php on line 19 How to solve this error?

5. Warning: mysql_free_result(): supplied argument is not a valid MySQL result

Introduction: Warning: mysql_free_result(): supplied argument is not a valid MySQL result

##6. We have a PHP-related issue, which is quite confusing

Introduction: I want to ask the experts about a PHP problem. I am very confused. The teacher said that mysql_free_result($query); is used to release memory, but I recently found a problem while writing a program. I would like to discuss it with you. Let’s discuss. Mysql_free_result($query); Can it only be used after the query record is completed? For example: $sql="select..."$query=my

7. Warning mysql_free_result(): supplied argument is not a valid MySQL result, how to solve it

##Introduction: Warning

[Related Q&A recommendations]:

mysql - php There is no error when using ordinary sql statements, but there is a problem when using stored procedures?

The above is the detailed content of 10 recommended articles about mysql_free_result. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn