note 47988 added to function.mysql-fetch-row

From: Date: Wed, 08 Dec 2004 09:52:34 +0000
Subject: note 47988 added to function.mysql-fetch-row
Groups: php.notes 
Request: Send a blank email to php-notes+get-81515@lists.php.net to get a copy of this message
Hi, I repeatedly saw samples where mysql_fetch_row(...) was called if the result of mysql_query(...) was !==false According to my experiences mysql_fetch_row(...) shouldn too not be called if the result of mysql_query(...) ===true That is when you call mysql_query(...) with something like "FLUSH QUERY CACHE" etc. I wrote a script that allows me to monitor multiple MySQL-Servers. I simply select a bunch of queries (SHOW VARIABLES etc.) from a ListBox which are executed after another. I added "FLUSH QUERY CACHE" to the list of queries to execute and got Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource When calling mysql_fetch_row(...) after the call to mysql_query("FLUSH QUERY CACHE") and only checking the result for boolean false. Bernhard ---- Manual Page -- http://www.php.net/manual/en/function.mysql-fetch-row.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+47988 Delete -- http://master.php.net/manage/user-notes.php?action=delete+47988&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47988&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47988&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47988&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47988&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47988&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+47988&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#81515) next »