ID: 46848 Updated by: [email protected] Reported By: lestilucio at gmail dot com -Status: Open +Status: Closed Bug Type: InterBase related Operating System: windows xp professional PHP Version: 5.2.8 New Comment:
Thank you for your bug report. This issue has already been fixed in the latest released version of PHP, which you can download at http://www.php.net/downloads.php Previous Comments: ------------------------------------------------------------------------ [2008-12-22 11:41:45] mapopa at gmail dot com Tested also on an WindowsXP with php 5.2.8 and results are correct 1Baldwin2Bender3Bennet4... and expected is 1Baldwin2Bender3Bennet4... here is the screenshot http://picasaweb.google.com/mapopa/CompotuSMOTUBlog#5282577227612712546 ------------------------------------------------------------------------ [2008-12-16 10:32:40] mapopa at gmail dot com Tested with latest stable 5.2.8 and results are correct /opt/php5.2.8/bin/php -v PHP 5.2.8 (cli) (built: Dec 16 2008 12:19:54) (DEBUG) /opt/php5.2.8/bin/php /var/www/test.php 1Baldwin2Bender3Bennet4Bishop5Brown6Burbank7Cook8De Souza9Ferrari10Fisher11Forest12Glon13Green14Guckenheimer15Hall16Ichida17Johnson18Johnson19Lambert20Lee21Leung22MacDonald23Montgomery24Nelson25Nordstrom26O'Brien27Osborne28Page29Papadopoulos30Parker31Phong32Ramanathan33Reeves34Stansbury35Steadman36Sutherland37Weston38Williams39Yamamoto40Yanowski41Young42Young also in flamerobin results are the same could you post the php_info ? ------------------------------------------------------------------------ [2008-12-16 10:02:20] mapopa at gmail dot com I have tested on my ubuntu box (jaunty) with firebird2.1 and php 5.2.6 and the rows are returned correctly $query='SELECT * FROM employee ORDER BY LAST_NAME ASC'; $username = "SYSDBA"; $password = "masterkey"; $host = '/var/lib/firebird/2.1/data/employee.fdb'; $conn = ibase_connect($host, $username, $password,'ISO8859_1',0,2) or die("<br>Connection failed:"); $dati = ibase_query($conn, $query) or die("<br>invalid query"); $i=0; while ($row = ibase_fetch_object ($dati)) { echo ++$i; echo $row->LAST_NAME; Here is the result 1Baldwin2Bender3Bennet4Bishop5Brown6Burbank7Cook8De Souza9Ferrari10Fisher11Forest12Glon13Green14Guckenheimer15Hall16Ichida17Johnson18Johnson19Lambert20Lee21Leung22MacDonald23Montgomery24Nelson25Nordstrom26O'Brien27Osborne28Page29Papadopoulos30Parker31Phong32Ramanathan33Reeves34Stansbury35Steadman36Sutherland37Weston38Williams39Yamamoto40Yanowski41Young42Young ------------------------------------------------------------------------ [2008-12-12 12:50:45] lestilucio at gmail dot com Description: ------------ Hello, I'm having a problem with an application developed in PHP, with an interbase/firebird database. I have Firebird 2.0.0 installed. I use the following code to display the whole records of a table with a query: Reproduce code: --------------- $query='SELECT * FROM ARTICLES ORDER BY DESCRIPTION ASC'; $username = "SYSDBA"; $password = "masterkey"; $host = 'C:\myposCE\EMPORIUMDB.GDB'; $conn = ibase_connect($host, $username, $password,'ISO8859_1',0,2) or die("<br>Connection failed:"); $dati = ibase_query($conn, $query) or die("<br>invalid query"); while ($row = ibase_fetch_object ($dati)) { echo $row->DESCRIPTION; echo "<BR>"; } Expected result: ---------------- I'm expected to see: 1 - GLASS 2 - TABLE 3 - CHAIR Actual result: -------------- Actual output: 1- TABLE 2- CHAIR The problem is that the query miss the first record of the table. Trying to change the ASC clause in DESC will only miss the last record instead of the first. If my table contains only a record, the query will display nothing at all! How can I solve this problem? ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46848&edit=1
