Nightlife impresario and Ryan Seacrest doppelganger, Michael Ault, and comic legend and Clem Kadiddlehopper portrayer, Red Skelton
![]() |
![]() |
";
$i = 0;
$candidates = array();
foreach ($tags as $tag) {
//SQL QUERY STRING
$pic = "";
$tag = addslashes($tag);
$query = "SELECT DISTINCT(t3.post_id), t1.title AS title, t1.url AS url, t1.bric_id AS bric_id, t1.tspic AS tspic, t1.cover_date AS cover_date, t1.permalink AS permalink FROM posts AS t1, tags AS t2, `posts-tags` AS t3 WHERE t1.id = t3.post_id AND t2.id = t3.tag_id AND t1.status > 0 AND t2.status = 1 AND t2.display_name = '$tag' ORDER BY t1.cover_date DESC LIMIT 4";
$result = mysql_query( $query ) or die( mysql_error() );
while($row = mysql_fetch_array($result, MYSQL_ASSOC) ) {
$bricid = $row[bric_id];
$tspic = $row[tspic];
$author_id = $row[author_id];
$author_name = $row[author_name];
$author_avatar = $row[author_avatar];
$author_link = $row[author_link];
$author_email = $row[author_email];
$cdate_year = substr($row['cover_date'],0,4);
$cdate_day = substr($row['cover_date'],8,2);
$cdate_month = substr($row['cover_date'],5,2);
$printnewdate = date("l, F jS Y", mktime(0, 0, 0, $cdate_month, $cdate_day, $cdate_year));
$candidate = "
";
if ((!array_key_exists($bricid, $candidates)) && ($bricid != $mainbricid)) {
$candidates[] = $candidate;
}
}
}
echo "
";
$relatedlinks = array_unique($candidates);
srand((float)microtime() * 1000000);
shuffle($relatedlinks);
foreach ($relatedlinks as $story) {
echo $story;
}
?>