Código PHP:
<?php
$post_id=$fila['post_id'];
$sql="select post_subject from ".$prefijo."posts_text where post_id='$post_id'";
$post_subject=mysql_db_query($bdatos,$sql);
$post_subject=mysql_fetch_assoc($post_subject);
$post_subject=$post_subject['post_subject'];
?>
<td>
<?php
echo $topic_title;
?>
</td>
Espero que ahora te funcione