[bbDev] tag error fixed up

Brian Crouch dr.brian.crouch at gmail.com
Wed May 4 13:10:58 GMT 2005


I fixed my obvious tag error with this change (the original 2005-05-04
code is commented out):

function get_topic_tags ( $topic_id ) {
        global $topic_tag_cache, $bbdb;

        if ( isset ($topic_tag_cache[$topic_id] ) )
                return $topic_tag_cache[$topic_id];

        /*$topic_tag_cache[$topic_id] = $bbdb->get_results("SELECT *
FROM $bbdb->tagged JOIN $bbdb->tags ON ($bbdb->tags.tag_id =
$bbdb->tagged.tag_id) WHERE topic_id = '$topic_id'");*/

        $topic_tag_cache[$topic_id] = $bbdb->get_results("SELECT *
FROM $bbdb->tagged,$bbdb->tags WHERE $bbdb->tags.tag_id =
$bbdb->tagged.tag_id AND topic_id = '$topic_id'");

        return $topic_tag_cache[$topic_id];
}


I don't know if any of you where getting errors... but mine was
barfing up some. It was the JOIN ... ON ... WHERE clause.

I got MySQL 3.23.58 for reference.

-- 
Brian


More information about the bbDev mailing list