Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: bbSync

Sorry fel but that piece of code isnt in there. This is what it looks like

‘<?php

function felblogtotopicid( $felpostID ) {

global $table_prefix, $wpdb;

$posts_table = $table_prefix . “bbpress_post_posts”;

$topic_id = $wpdb->get_var(“SELECT topic_id FROM $posts_table WHERE post_id = $felpostID LIMIT 1;”);

return $topic_id;

}

global $post, $wpdb;

if( $forumtopic = felblogtotopicid( $post->ID ) ) {

$bbprefix = get_option( ‘wpbb_bbprefix’ );

$replies = $wpdb->get_results( ‘

SELECT poster_id, post_text, post_time

FROM ‘ . $bbprefix . ‘posts

WHERE topic_id = ‘ . $forumtopic

);’

I think it has something to do with ‘$table_prefix, $wpdb;’ and ‘$posts_table = $table_prefix . “bbpress_post_posts”;’. My table prefix is not wpdb (where wpdb = database name) it is just wp. Plus that ‘.’ in there is throwing it off as well as the error reads:

[Table ‘databasename.posts’ doesn’t exist]

SELECT poster_id, post_text, post_time FROM posts WHERE topic_id = 6

“.posts” That ‘.’ is getting into the code and appending itself to the db name…

I think…

You are the master though….

Skip to toolbar