docs on mysqli_query return values are incorrect.
j adams <[email protected]>
| Newsgroups | gmane.comp.php.documentation.general |
|---|---|
| Message-ID | <CADbOR2hp+Mgqrj2TfoPX84AHG4LT7-gZdCsPAGEXHfrfmpjLTA@mail.gmail.com> |
Hello! Apologies if I'm emailing the wrong list. There is a problem with the return value description for mysqli_query, displayed here: https://www.php.net/manual/en/mysqli.query.php Under 'Return Values,' it says: >Returns *false* on failure. For successful SELECT, SHOW, DESCRIBE or EXPLAIN queries *mysqli_query()* will return a mysqli_result <https://www.php.net/manual/en/class.mysqli-result.php> object. For other successful queries *mysqli_query()* will return *true* This is not correct. I can provide one counterexample, which is when you run an optimize query: OPTIMIZE TABLE my_table; This query will return a result set with two records whether the table exists or not. I believe I found the file that should be altered on github here: https://github.com/php/doc-en/blob/master/reference/mysqli/mysqli/query.xml#L111 I do not know what the return value description should be under all the various circumstances.