Warning: mysql_fetch_array() expects parameter 1 to be resource, boole
Pessoal, estou a uns dois dias tentando resolver este problema... esta mensagem que aparece não consigo retira-la. Alguém me ajuda por favor... o código em questão é :
<?
session_start();
include("../vars.php");
include ("../headfoot.php");
include("../auth.php");
mysql_connect($db_host, $db_user, $db_pwd);
mysql_select_db($db_name);
$res = checkauth();
$usrid = mysql_result($res, 0, "id");
include ("../header.php");
echo("<h4>Rank de Surf HOJE</h4>");
echo("<div align=center><table border=\"0\"><tr><td align=center><a href=\"".$self_url."members/index.php?".session_name()."=".session_id()."\"><img src=\"images/home2.png\" border=\"0\"><br>Painel de Controle</a></td></tr></table></div>");
?>
<style>
<!--
.comprarprodutostit {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 24px;
font-style: normal;
line-height: normal;
font-weight: bold;
font-variant: normal;
color: #000000;
text-decoration: none;
}
.style1 {font-size: 18px}
.style2 {
color: #FF0000;
font-weight: bold;
}
-->
</style>
<p></p><br>
<center>
<div align="center" class="style2">Lista dos Membros que Mais Surfaram HOJE</div>
<br>
<table width="60%" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="10%" align="center"><strong>ID #</strong></td>
<td width="40%" align="center"><strong>N O M E</strong></td>
<td width="10%" align="center"><strong>Páginas<U></U></strong></td>
</tr>
<?php
$sql = mysql_query("SELECT * FROM `user` WHERE `lastsurfed` ORDER BY `user`.`day_pages` DESC");while($sx = mysql_fetch_array($sql)){ ( LINHA 67 ONDE DIZ ESTAR O ERRO)
?>
<tr>
<td style="font-size: 14px;" width="10%" align="center"><? if($sx["id"]==""){echo(" ");}else{echo($sx["id"]);} ?></td>
<td style="font-size: 14px;" width="40%"><? if($sx["name"]==""){echo(" ");}else{echo(" ");}{echo($sx["name"]);} ?></td>
<td style="font-size: 14px;" width="10%" align="center"><?=$sx["day_pages"] ?></td>
</tr>
<? } ?>
</table>
</center>
<br>
<?php
echo("<h4> </h4><div align=center><table border=\"0\"><tr><td align=center><a href=\"".$self_url."members/index.php?".session_name()."=".session_id()."\"><img src=\"images/home2.png\" border=\"0\"><br>Painel de Controle</a></td></tr></table></div>");
secfooter();
mysql_close;
exit;
?>
<?php
include ("../footer.php");
?>Discussão (6)
Carregando comentários...