i have a ver starbge problem , i was making a site and was completly correct on the localhost,but when i upload irt to a server to test it something stange happened which is i got that error
Warning: mysql_result() expects parameter 1 to be resource, boolean given in /home/saraanv/public_html/blog_web/index.php on line 10
this is the code part which has the error , any help plzz?
<?php
include 'config.php';
$q="select * from `topic` order by `id` desc";
$result=mysql_query($q);
echo "<table>";
for ($i=0;$i<8;$i++)
{
echo "<tr>";
$topic_id=mysql_result($result,$i,'id');
$topic_name=mysql_result($result,$i,'title');
$num_char=strlen($topic_name);
//echo $num_char;
if ($num_char>25)
{
echo "<td>";
echo "<a href='show_topic.php?id=$topic_id'>";
echo "<font color='#002248' face='Times New Roman, Times, serif' size='2'>";
echo substr($topic_name,0,30);
echo "</font>";
echo "</a>";
echo "......";
echo "</td>";
}
else
{
echo "<td>";
echo "<a href='show_topic.php?id=$topic_id'>";
echo "<font color='#002248' face='Times New Roman, Times, serif' size='2'>";
echo $topic_name;
echo "</font>";
echo "</a>";
echo "</td>";
}
echo "<td>";
echo "<a href='show_topic.php?id=$topic_id'>";
echo "<img src='images/Plus.png' height='20' width='20' align='left' border='0' />";
echo "</a>";
echo "</td>";
echo "</tr>";
}
echo "</table>";
?>