这是我的代码
<?php
$result = mysql_query("SELECT * FROM post WHERE username = ".$username." ORDER BY ID DESC ");
while($row = mysql_fetch_array($result)){
?>
<div class="post">
<a href="/p/<?php echo $row['ID']; ?>" class="post-title"><?php echo $row['title']; ?> - (Rating: <?php echo $row['rank']; ?>)</a>
<p class="post-content"><?php echo $row['description']; ?><br /><br />On <?php echo $row['date']; ?></p>
</div>
<?php }; ?>
但我得到这个错误:
警告:mysql_fetch_array() 期望参数 1 是资源,布尔值在第 77 行的 /*/programs/user.php 中给出