先找两个例子:
$rt = $db->get_one("SELECT postdate,author FROM $pw_posts WHERE tid=".S::sqlEscape($key)."ORDER BY postdate DESC LIMIT 1");
$query = $db->query("SELECT tid,subject,author,authorid,postdate,titlefont,topped,digest,specialsort FROM pw_threads WHERE fid=".S::sqlEscape($fid)." AND ifcheck='1' $sql ORDER BY specialsort DESC,lastpost DESC $limit");