<?php
include 'config.php';
$tid = $_GET['tid'];
$sql="SELECT FROM topics where tid='$tid'";
$result=mysql_query($sql);
while($rows=mysql_fetch_array($result)){
?>
<div class="topics"><font size="4"><?php echo $rows['title']; ?></font></div><div class="tdm"><br/><center><img src="http://appricart.com/test/img/<?php echo $rows['photo']; ?>" height="100" width="100"/><br/>
<small><?php echo $rows['message']; ?></small></div>
<?php
}
include 'foot.php';
?>
有时这段代码有效,有时它不能帮助我解决这个问题。
它显示了这个错误
mysql_fetch_array() expects parameter 1 to be resource