Alright I'm running into a little bit of a problem. On one page I'm not sure if you can do this but I'm trying to use the mysql_result function twice. The first is this and this one works perfectly fine...
$query="SELECT * FROM evoBoard_users ORDER BY `users_username` ASC";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
$i=0;
while ($i < $num) {
$users_username=mysql_result($result,$i,"users_username");
$users_age=mysql_result($result,$i,"users_age");
$users_utitle=mysql_result($result,$i,"users_utitle");
echo "
<td width='1' bgcolor='000000'><img src='images/forum_end.PNG' height='100%' width='1'></td>
<td background='images/post_main.PNG'> <b>$users_username</b></td>
<td background='images/post_main.PNG'><center>$users_age</center></td>
<td background='images/post_main.PNG'> $users_utitle</td>
<td width='1' bgcolor='000000'><img src='images/forum_end.PNG' height='100%' width='1'></td></tr>
<tr><td height='1' width='100%' colspan='5' background='images/forum_end.PNG'> </td></tr>";
$i++;
}
Now the problem happens the second time where I try accessing a seperate table.
$query="SELECT * FROM 'data'";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
$s=0;
while ($s < $num) {
$version=mysql_result($result,$s,"version");
echo "
$version<br>
";
$s++;
}
Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in /home/nodq/public_html/vbads/footer.inc.php on line 11
Is the wonderful error
Where exactly am I going wrong with this second query and what can I do to fix it?