Bug #4509: sybase_query return other value than valid resultset or FAILURE
| From: | dan at fio dot cz | Date: | Thu, 18 May 2000 18:32:12 +0000 |
| Subject: | Bug #4509: sybase_query return other value than valid resultset or FAILURE | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-18926@lists.php.net to get a copy of this message | ||
From: dan@fio.cz
Operating system: FreeBSD 3.4
PHP version: 3.0.16
PHP Bug Type: Sybase (dblib) related
Bug description: sybase_query return other value than valid resultset or FAILURE
if submitted query is valid and executed, but it return nothing then php3_sybase_query may return
TRUE (but TRUE isn't valid resultset).
Relevant part of code (functions/sybase.c->php3_sybase_query)
--------------------------------
num_fields = dbnumcols(sybase_ptr->link);
if (num_fields<=0) {
RETURN_TRUE;
}
--------------------------------
So sybase_query end OK (via return on line 3 of listed code), but calls to other functions (as
sybase_num_rows) complain that 1 isn't valid resultset.