Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10082 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21080 invoked by uid 1010); 25 May 2004 11:44:43 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 21036 invoked from network); 25 May 2004 11:44:43 -0000 Received: from unknown (HELO hamlet) (80.126.21.70) by pb1.pair.com with SMTP; 25 May 2004 11:44:43 -0000 Received: from [127.0.0.1] ([127.0.0.1]) by hamlet with Microsoft SMTPSVC(6.0.2600.1106); Tue, 25 May 2004 13:44:26 +0200 Message-ID: <40B33198.8000003@php.net> Date: Tue, 25 May 2004 13:44:24 +0200 User-Agent: Mozilla Thunderbird 0.6 (Windows/20040502) X-Accept-Language: en-us, en MIME-Version: 1.0 To: internals@lists.php.net Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 25 May 2004 11:44:26.0402 (UTC) FILETIME=[A194E020:01C4424D] Subject: BC for affected row count (interbase) From: abies@php.net (Ard Biesheuvel) Hello, Recently, I've changed ibase_query() to return the number of affected rows, if appropriate. This works like a charm in all cases except the one where the query is successful but no rows are returned. Returning int(0) in this case would evaluate to 'false' indicating failure. This would break BC. Right now I just return bool(true) in this case, which evaluates to int(1) in a numerical context, which is also incorrect. [You'd have to test both the type and the value, like in the 'strpos(...) !== false' case] I would like to change it to return string('0 ') [with space], as it evaluates to bool(true) in a boolean context and to int(0) in a numeric context. Any thoughts ? -- Ard