Can someone help remind me. Im carrying out a search of the wordpress tables. I've the search phrases steered clear of by using this line.

$search_terms = like_escape($wpdb->escape($search_terms));

Is sufficient to safeguard against SQL inserts. Also, i personally use MATCH on the became a member of MyISAM FULLTEXT area in another table. It appears to become coming back correct results. I am not using $wpdb->prepare. Should i?

                  forum.forum_name AS group_name,
                  `group`.slug AS child_slug,
                  `parent`.slug AS parent_slug
                FROM bb_posts post
                LEFT JOIN bb_topics topic
                  ON topic.topic_id = post.topic_id
                LEFT JOIN bb_forums forum
                  ON forum.forum_id = topic.forum_id
                LEFT JOIN wp_bp_groups `group`
                  ON topic.forum_id = `group`.id
                LEFT JOIN wp_bp_groups `parent`
                  ON `group`.parent_id = `parent`.id
                WHERE (topic_title LIKE '%$search_terms%' ||
                  MATCH(post.post_text) AGAINST('$search_terms')) &&
                  topic_status = 0
                GROUP BY topic_id
                LIMIT $offset,$num

Lastly, will this be adequate to make certain pagination is protected?

// check $offset and $num are integers
        if (!is_int($offset) || !is_int($num)){
            die("Error. Paging must have integers!");