你的regDate是什么类型的?如果是string,比较起来可能会造成歧义,建议转成int型再比较。
你的表内有auto_increment这个类型的字段吧?order by 它也行。

解决方案 »

  1.   

    select top 5 * from criticism_production order by regDate desc
      

  2.   

    我的那个regDate是datetime类型的
      

  3.   

    select top 5 * from criticism_production order by regDate desc:这就选日期最新的5条记录.
      

  4.   

    <?php
    $p = mysql_query("select * from criticism_production order by regDate desc limit 0,5");echo "<table>";
    while($rows = mysql_fetch_array($p))
    {
    echo "<tr>";
    echo "<td>";$rows['title'];
    echo "</td>";
    echo "<td>";$rows['context'];
    echo "</td>";
    echo "</tr>";
    }
    echo "</table>";
    ?>
      

  5.   

    上面copy你的写错了<?php
    $p = mysql_query("select * from criticism_production order by regDate desc limit 0,5");echo "<table>";
    while($rows = mysql_fetch_array($p))
    {
    echo "<tr>";
    echo "<td>".$rows['title'];
    echo "</td>";
    echo "<td>".$rows['context'];
    echo "</td>";
    echo "</tr>";
    }
    echo "</table>";
    ?>
      

  6.   

    select top 5 * from criticism_production order by regDate desc:这就选日期最新的5条记录.****************88888
    php能用TOP?