In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces "the detailed explanation of the return value of mysql_query () function when mysql inserts data". In daily operation, it is believed that many people have doubts about the problem of mysql_query () function return value when mysql inserts data. The editor consulted all kinds of materials and sorted out simple and useful operation methods. I hope it will be helpful for you to answer the question of "detailed explanation of the return value of the mysql_query () function when mysql inserts data"! Next, please follow the editor to study!
Problem description:
I was working on mysql, closing the resource when inserting data, and PHP prompted a warning. Basically, you need to give mysql_free_result () a resource type.
Then, I will return the result var_dump ($res), which is found to be a Bool value
Analysis:
When you look at the manual, it seems that the mysql_query () function returns a resource type, but why is it a bool value now? Well, after patiently reading the manual, I found that the principle is like this, as shown in the following picture:
Summary: it can be seen from the above that when mysql_query () executes the sql statement, it does not always release the result set, but when some operations produce a result set, it calls mysql_free_result () to release; it is not necessary for people like insert update to return Bools, otherwise it is superfluous.
At this point, the study of "detailed explanation of the return value of the mysql_query () function when mysql inserts data" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.