[thelist] checking for empty result rows in PHP

Tom Dell'Aringa pixelmech at yahoo.com
Wed Dec 11 15:10:01 CST 2002


What is the best way to check for a result set that is empty? I have
the following:

while($row = mysql_fetch_array($result))
{
    $registrar = $row["registrar"];

	if($registrar == "")
	{
		print "registry is empty.";
	}
	print "r: $registrar";
}

I tried using empty() and tried checking to see if $row was empty()
and those didn't seem to work.

Tom

=====
var me = tom.pixelmech.webDeveloper();

http://www.pixelmech.com/
http://www.maccaws.com/
[Making A Commercial Case for Adopting Web Standards]

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



More information about the thelist mailing list