#46848 [NEW]: Missing Record in query

From: Date: Fri, 12 Dec 2008 12:50:45 +0000
Subject: #46848 [NEW]: Missing Record in query
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-131949@lists.php.net to get a copy of this message
From: lestilucio at gmail dot com Operating system: windows xp professional PHP version: 5.2.8 PHP Bug Type: InterBase related Bug description: Missing Record in query 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 bug report at http://bugs.php.net/?id=46848&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46848&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46848&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46848&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46848&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46848&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=46848&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46848&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46848&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46848&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46848&r=support Expected behavior: http://bugs.php.net/fix.php?id=46848&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46848&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46848&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46848&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46848&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46848&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46848&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46848&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46848&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46848&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46848&r=mysqlcfg

« previous php.bugs (#131949) next »