<UL>
<?php
$result = db_query("select n.nid from {term_node} tn, {node} n where tn.nid = n.nid and tn.tid = 14 ORDER BY nid DESC LIMIT 0,10");
pressflow是一个高性能的drupal版本,随着drupal更新到了6.15版本,pressflow也更新了,最新版本是6.15.65,站长很多站都是基于这个版本搭建的,如邯郸网等。
说实在的,drupal确实很复杂, 在国内用的人也不多,唯一看的懂的中文技术网站估计就是 drupalchina.org了,
但是对于源代码的分析是少之又少.没有办法,只能自己来从头看起了!
越复杂的东西,往往功能越强大,drupal也是这样的.
$VID = 2; /* Desired vocabulary term ID */
$result = db_query("SELECT * FROM {term_data} d WHERE d.vid = $VID ORDER BY d.name");
node.module的1798行
$result = db_query_range("SELECT n.nid FROM {node} n LEFT JOIN {search_dataset} d ON d.type = 'node' AND d.sid = n.nid WHERE n.type = 'news' or n.type = 'life' or n.type = 'og' and d.sid IS NULL OR d.reindex <> 0 ORDER BY d.reindex ASC, n.nid ASC", 0, $limit);
while ($node = db_fetch_object($result)) {
print_r($node);
//exit();
_node_index_node($node);
}