#33098 [Csd->Bgs]: mysql_fetch_array(mysql_query("mysql query here")) crashes

From: Date: Sun, 22 May 2005 11:13:15 +0000
Subject: #33098 [Csd->Bgs]: mysql_fetch_array(mysql_query("mysql query here")) crashes
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-79331@lists.php.net to get a copy of this message
ID: 33098 Updated by: tony2001@php.net Reported By: tloudimm at go2 dot pl -Status: Closed +Status: Bogus Bug Type: MySQL related Operating System: Linux PHP Version: 4.3.11 New Comment: . Previous Comments: ------------------------------------------------------------------------ [2005-05-22 10:17:59] tloudimm at go2 dot pl sorry for making unnecessary mess - friend of mine told me that in the first code there is an infinite loop.. sorry once again ------------------------------------------------------------------------ [2005-05-22 01:06:44] tloudimm at go2 dot pl Description: ------------ hi there. i found a bug [well, i think it's a bug, it onced crashed my apache server].. found it in 4.3.10 first, than in 4.3.11 again. anyway, here's some sample code: <? mysql_connect($host,$user,$pass); mysql_select_db(some_db); while($mysql_answer = mysql_fetch_array(mysql_query("SELECT * FROM some_table")) { //do something - there goes a crash } ?> however <? mysql_connect($host,$user,$pass); mysql_select_db(some_db); $mysql_query = mysql_query("SELECT * FROM some_table"); while($mysql_answer = mysql_fetch_array($mysql_query) { //do something - nothing bad happens here } ?> i searched bug database and found nothing like my observations. sorry if i make too much mess - delete my report if so :) greetings. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33098&edit=1

« previous php.bugs (#79331) next »