getting errors .... mysql_fetch_array ....
Posted: Sat Feb 19, 2005 11:57 pm
this the code i used many times before and it workd just fine .. not it doesn't .... can anyone find something wrong with this ? 
The code works great when i initially log in .. i shows the number of messages for tthe user .. but as soon i click on a link to display messages i get this error .....
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/domain/public_html/portal/sindex.php on line 56
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/domain/public_html/portal/sindex.php on line 59
thank you.
Greg
The code works great when i initially log in .. i shows the number of messages for tthe user .. but as soon i click on a link to display messages i get this error .....
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/domain/public_html/portal/sindex.php on line 56
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/domain/public_html/portal/sindex.php on line 59
Code: Select all
<?
$query = "SELECT * FROM table1 WHERE username='user'";
$result = mysql_query($query, $link);
while($row = mysql_fetch_array($result))
{
$uid = $rowї'uid'];
$count = mysql_query("SELECT COUNT(*) FROM msg_system WHERE msg_to='$uid' AND msg_viewed='0'");
$counter=mysql_result($count,0);
?>
<td align="right" height="20"><a href="?page=msg&uid=<? echo $uid; ?>">your mailї<? echo $counter; ?>]</a>
<?
}Greg