Re: docs on mysqli_query return values are incorrect.
| From: | Kamil Tekiela | Date: | Tue, 05 Jan 2021 00:28:13 +0000 |
| Subject: | Re: docs on mysqli_query return values are incorrect. | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969387780@lists.php.net to get a copy of this message | ||
The documentation is correct (at least that part) but what you have
encountered is a bug, either in mysqli or in MySQL. Please file a bug
report on https://bugs.php.net/ and we will look into it.
On Tue, 5 Jan 2021 at 00:12, j adams <zardozrocks@gmail.com> wrote:
> 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.
>