Views rows style模板重写代码_php文摘_脚本之家
程序员文章站
2024-01-23 13:33:28
...
重写rows style模板,可以控制整个VIEWS的输出布局,就像VIEWS是个选择器,布局任你编排
以下是代码例子。
代码如下:
$nid = $row->nid;
$country = db_result(db_query('SELECT name FROM {term_data} term_data JOIN {term_node} term_node ON term_node.tid = term_data.tid WHERE term_data.vid = %d AND term_node.nid = %d', 1, $nid));
$investment = db_result(db_query('SELECT name FROM {term_data} term_data JOIN {term_node} term_node ON term_node.tid = term_data.tid WHERE term_data.vid = %d AND term_node.nid = %d', 2, $nid));
?>
content ?>
content ?>
content ?>
content ?>
content ?>
上一篇: MySQL Join详解_MySQL
下一篇: 根据表名和索引获取需要的列名的存储过程