Re: Anyone know why this won't return results?

From: Date: Fri, 07 Jun 2002 22:00:18 +0000
Subject: Re: Anyone know why this won't return results?
Groups: php.db 
Request: Send a blank email to php-db+get-19675@lists.php.net to get a copy of this message
Thanks Paul, You were absolutely right! I can't believe I didn't see that hidden in there. That explains why I never got any error messages. Thanks again, Blaine >>> Paul DuBois <paul@snake.net> 06/07/02 05:55PM >>> At 17:45 -0400 6/7/02, Blaine Dinsmore wrote: ><html> ><head> ><title>Results Test</title> ><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> ></head> > ><body bgcolor="#FFFFFF" text="#000000"> ><?php >$server = "mdotlims"; >$user = "httpuser"; >$pass = "pass"; > > > $db = @mysql_connect($server,$user,$pass); > if (!$db) { > echo( "<p>Unable to connect to the " . > "database server at this time.</p>"); > exit(); > } >if (! @mysql_select_db("lims_issues")) { > echo("Unable to locate the issues " . > "database at this time.</p>" ); > exit(); > } > > $result = @mysql_query("SELECT Notes FROM Bugs"); > > if (!$result) { > echo("<p>Error performing query: " . >mysql_error() . "</p>"); > exit(); > } > > While( $myrow = mysql_fetch_array($result) );{ You have a semicolon on the previous line, which terminates the while loop - a bit prematurely, I'd guess. :-) > echo ("<BR>" . $myrow["NOTES"]); > } > > > mysql_free_result($result); > >?> > ></body> ></html>

« previous php.db (#19675) next »