#48453 [Opn->Fbk]: fetch_assoc() problem

From: Date: Tue, 02 Jun 2009 20:09:18 +0000
Subject: #48453 [Opn->Fbk]: fetch_assoc() problem
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-137987@lists.php.net to get a copy of this message
ID: 48453 Updated by: jani@php.net Reported By: gubbov53 at hotmail dot com -Status: Open +Status: Feedback Bug Type: mSQL related Operating System: Vista PHP Version: 5.2.9 New Comment: Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. Previous Comments: ------------------------------------------------------------------------ [2009-06-02 15:13:12] gubbov53 at hotmail dot com Description: ------------ fetch_assoc() (see below) does not work. Hangs Apache. If "$row=$result->fetch_assoc();" is replaced by "$row=$result->fetch_row();" the code is working... Reproduce code: --------------- $result=$db->query($query); $num_results=$result->num_rows; echo "<p>Number of books found: ".$num_results."</p>"; for ($i=0; $i<$num_results; $i++) { $row=$result->fetch_assoc(); // Does not work!!! ... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=48453&edit=1

« previous php.bugs (#137987) next »