php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #65158 mysql_num_rows() ambigious return value description
Submitted: 2013-06-28 12:46 UTC Modified: 2013-10-22 08:15 UTC
From: ddpm at liscovius dot de Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
42 - 42 = ?
Subscribe to this entry?

 
 [2013-06-28 12:46 UTC] ddpm at liscovius dot de
Description:
------------
---
From manual page: http://www.php.net/function.mysql-num-rows#refsect1-function.mysql-num-rows-returnvalues
---

It is unclear what "failure" means in the description of this function.

If a query return 0 rows it is IMHO not a failure. It is a valuable information, that 0 entry match my query.

So I suggest reformulating this part and make clear what is given back if no row 
matched the query. 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-10-22 08:15 UTC] krakjoe@php.net
-Status: Open +Status: Not a bug
 [2013-10-22 08:15 UTC] krakjoe@php.net
It should be obvious to anyone expecting int(0) that they should !== false the result of the call.

Changing the wording will not promote correct use of the function, because it would not provide different information, the same information using different words.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 13:01:28 2024 UTC