ID: 25615 Updated by: [EMAIL PROTECTED] Reported By: norbert at linuxnetworks dot de -Status: Open +Status: Closed Bug Type: Documentation problem PHP Version: 4.3.1 New Comment:
I changed the documentation to clarify the return-values that dbx_query produces. This will show up online as soon as the documentation is rebuilt. Thanks for your support. Previous Comments: ------------------------------------------------------------------------ [2003-09-22 03:34:10] [EMAIL PROTECTED] Besides the fact that this wouldn't be backwards compatible, I do not think that a return value of 1 is the exception case. Whenever you try an insert/update/delete query you expect either success or failure (1 or 0). When you do a select query you expect a result set or a failure. There is no need to test for a result-object OR success: successful select queries that produce no resultset do return an empty object as you described (except that cols will not be 0, and columnnames will be set if the ASSOC flag was passed). I see that the documentation incorrectly performs this test on a select query, so I can see why you would report this feature request. I'm changing this request to a be documentation problem, which I will fix shortly. ------------------------------------------------------------------------ [2003-09-20 14:42:27] norbert at linuxnetworks dot de Description: ------------ dbx_query should return an empty object (rows = 0, data empty) instead of 1. This would make code for the exception case (return value of 1) unnecessary. Furthermore the API don't have to be changed for this, so I would be an easy impovement. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25615&edit=1