如何按照降序排序时间以下代码怎么才能改成以time为降序来排序时间PHP code$sql SELECT k.id, k.uid AS
如何按照降序排序时间 以下代码怎么才能改成以time为降序来排序时间
PHP code
$sql = "SELECT k.id, k.uid AS likeuid,k.time as ktime, b . * , m.username, m.domain FROM `".DBPRE."likes` AS k LEFT JOIN `".DBPRE."blog` AS b ON k.bid = b.bid LEFT JOIN `".DBPRE."member` AS m ON b.uid = m.uid WHERE k.uid = '{$_SESSION['uid']}'";
[解决办法] ORDER BY [TIME] DESC [解决办法] order time desc [解决办法] order by k.time desc ? [解决办法] order by ktime desc [解决办法] $sql = "SELECT k.id, k.uid AS likeuid,k.time as ktime, b . * , m.username, m.domain FROM `".DBPRE."likes` AS k LEFT JOIN `".DBPRE."blog` AS b ON k.bid = b.bid LEFT JOIN `".DBPRE."member` AS m ON b.uid = m.uid WHERE k.uid = '{$_SESSION['uid']}' order by ktime desc"; [解决办法]