Re: not a valid MySQL result resource

From: Date: Fri, 27 Oct 2000 02:27:40 +0000
Subject: Re: not a valid MySQL result resource
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-22250@lists.php.net to get a copy of this message
On Fri, 27 Oct 2000, Gary wrote: > Hi All, > > I am getting tow error for a piece of code. can someone look this over > and see where I screwed up. > > Warning: Supplied argument is not a valid MySQL result resource in > g:\program files\apache > group\apache\htdocs\next.php on line 23 > /td> > Warning: Supplied argument is not a valid MySQL result resource in > g:\program files\apache > group\apache\htdocs\next.php on line 33 > PREV NEXT > > while ($data=mysql_fetch_array($result)){ <------------------line 23 > > echo "<table border=1>\n"; > > echo > > "<tr><td>ID</td><td>Accepted</td><td>Username</td><td>Password</td><td>Email</td></tr>\n"; > > } do { > > > printf("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s<td>/td><td>%s</tr>\n",$myrow["id"],$myrow["accepted"],$myrow["username"],$myrow["password"],$myrow["email"]); > > } while($myrow = mysql_fetch_array($result)); <---------------line 33 > > echo "</table>\n"; > > thanks > Gary > http://www.php.net/FAQ.php#7.12 -- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA

« previous php.general (#22250) next »