*crosses fingers*
function recent_comments($limit = 5) {
global $wpdb, $tableposts, $tablecomments, $siteurl, $blogfilename;
$out = '';
$sql = "SELECT ID, post_title, comment_ID, comment_author, comment_date, comment_content FROM $tableposts, $tablecomments";
$sql .= " WHERE $tableposts.ID=$tablecomments.comment_post_ID";
$sql .= " ORDER BY $tablecomments.comment_date DESC LIMIT $limit";
$posts = $wpdb->get_results($sql);
foreach ($posts as $post) {
$permalink = $siteurl.'/'.$blogfilename.'/?p='.$post->ID.'&c=1#comment-'.$post->comment_ID;
$comment = substr(stripslashes($post->comment_content), 0, 50);
$out .= '