Hello! I apologize for troubling this list. I found a problem with the
english language documentation on mysqli_query and have attempted to send
an email to php...@lists.php.net but am totally unsure if anyone will ever
receive it. In any case, I expect the documentation people may need some
help correcting the documentation. The text of my issue report follows:



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.

Reply via email to