A brief discussion on the return value of the mysql_query() function
Problem description:
I was operating mysql and when inserting data, I closed the resource and PHP prompted a warning. The content is roughly as follows: you need to give mysql_free_result() a resource type.
Then, I will return the result var_dump ($res) and find that it is a bool value
Analysis:
When I read the manual, at first glance, I feel that the mysql_query() function returns the resource type, but why is it now? Is the bool value
Summary: From the above, we can know that when mysql_query() executes a sql statement, it does not need to release the result set whenever, but when certain operations produce a result set, it calls mysql_free_result() to release; There is no need to return bool values like insert update, otherwise it will be superfluous
The above article briefly discussing the return value of the mysql_query() function is all the content shared by the editor. I hope it can give you a reference, and I hope everyone will support the PHP Chinese website.
For more articles on the return value of the mysql_query() function, please pay attention to the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

