#174343 by Shiny: move JOIN condition to ON clause in forum_nodeapi, so our SQL is standards compatible

6.x
Gábor Hojtsy 2007-09-10 08:06:59 +00:00
parent ea0f102c21
commit c4b02c1213
1 changed files with 1 additions and 1 deletions

View File

@ -251,7 +251,7 @@ function forum_nodeapi(&$node, $op, $teaser, $page) {
$node->tid = $term_id;
}
}
$old_tid = db_result(db_query_range("SELECT t.tid FROM {term_node} t INNER JOIN {node} n WHERE t.vid = n.vid AND n.nid = %d ORDER BY t.vid DESC", $node->nid, 0, 1));
$old_tid = db_result(db_query_range("SELECT t.tid FROM {term_node} t INNER JOIN {node} n ON t.vid = n.vid WHERE n.nid = %d ORDER BY t.vid DESC", $node->nid, 0, 1));
if ($old_tid) {
if (($node->tid != $old_tid) && $node->shadow) {
// A shadow copy needs to be created. Retain new term and add old term.