In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces "the case analysis of the return value of the number of mysqli_affected_rows lines in PHP". In the daily operation, I believe that many people have doubts in the case analysis of the return value of the number of mysqli_affected_rows lines in PHP. Xiaobian consulted all kinds of data and sorted out a simple and easy-to-use operation method. I hope it will be helpful for you to answer the doubt of "the case analysis of the return value of the number of mysqli_affected_rows lines in PHP". Next, please follow the editor to study!
The number of rows affected by update operations in mysqli can be returned in two ways:
1. Returns the number of matching rows
two。 Returns the number of rows affected
By default, the value returned by mysqli_affected_rows is the number of rows affected. If we need to return a matching number of rows, we can initialize the database connection using the mysqli_real_connect function and add the following to the function's flag parameter bit:
MYSQLI_CLIENT_FOUND_ROWS return number of matched rows, not the number of affected rows
Normal format:
The copy code is as follows:
Int mysqli_affected_rows (mysqli link)
Oop format:
The copy code is as follows:
Class mysqli {
Int affected_rows
}
Take a look at the example:
In normal mode, the code is as follows:
The copy code is as follows:
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.