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

From: Date: Sun, 22 May 2005 08:18:00 +0000
Subject: #33098 [Opn->Csd]: mysql_fetch_array(mysql_query("mysql query here")) crashes
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-79329@lists.php.net to get a copy of this message
ID: 33098 User updated by: tloudimm at go2 dot pl Reported By: tloudimm at go2 dot pl -Status: Open +Status: Closed Bug Type: MySQL related Operating System: Linux PHP Version: 4.3.11 New Comment: sorry for making unnecessary mess - friend of mine told me that in the first code there is an infinite loop.. sorry once again Previous Comments: ------------------------------------------------------------------------ [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 (#79329) next »