我只是想通过 ID 对评论进行排序,但我没有运气。无法弄清楚该怎么做,因为这让我感到困惑:articleid='" . mysql_real_escape_string($_GET['id']) . "'
你们会碰巧知道我如何通过 DESC 中的 id 对评论进行排序吗?谢谢!
<?php
$amount_get = mysql_query("SELECT * FROM comment WHERE articleid='" . mysql_real_escape_string($_GET['id']) . "'"); $comments = mysql_num_rows($amount_get);
$grab = mysql_query("SELECT * FROM comment WHERE articleid='" . mysql_real_escape_string($_GET['id']) . "'");
if (mysql_num_rows($grab)==0) {
echo "<div class='alert alert-note-x'>Sorry, it looks like their are no comments to be displayed, check back later!</div>";
}
while($row = mysql_fetch_array($grab)){
?>