Talk Stories

Here’s a summary of my published stories, broken up by genre (more or less). Beside each story is the number of reviews it has had and the amount of discussion on this site about it. Please contribute! If you’ve liked or hated any of these stories please click the discussion links and let me know.
Thanks for stopping by!
“.$title.”

“;
echo “

“;
foreach ($arr as $val)
{
$page = 0;
// $page = get_page_id(“The End of the Road”);
//echo $page;
$page = get_page_by_title($val->name)->ID;
// echo ” debug name = “.$val->name;
// echo ” debug page = “.$page;
$commentcount = wp_count_comments($page);
$i_commentcount = $commentcount->approved ;//removed the subtraction

if ($i_commentcount < 0) $i_commentcount = 0; echo "

“;

}
echo “

“.$val->name.” pagelink.”\”>”.”Join the discussion ” ;
if (0 != $i_commentcount)
{ //a pullquote
//echo “

Comments: “. $i_commentcount.”

“;
echo “ “.$i_commentcount;
}
if (0 != $val->reviewcount)
{
// echo ” Reviews: “.$val->reviewcount;
echo “ “.$val->reviewcount;
}
echo “

“;
}

$dbhost = ‘sql7.bravehost.com’;
$dbuser = ‘biolistname’;
$dbpass = ‘wr7wr8Guches4uFr’;

$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die (‘Error connecting to mysql’);

$dbname = ‘biolist_187812’;
$db = mysql_select_db($dbname);

$storytypefilter=”story”;

$result = mysql_query(“SELECT * from stories where storynovelarticle='”.$storytypefilter.”‘ order by title “)
or die(mysql_error());
// store an array for each GENRE
$sciencefiction = array();
$fantasy=array();
$urban=array();
$horror=array();

while($row = mysql_fetch_array($result))
{

// echo $row[‘title’];
$obj = new record;
$obj->name = $row[‘title’];
$obj->pagelink = $row[‘pagelink’];

$count = mysql_query(“SELECT COUNT(id) from reviews where idlink=”.$row[‘id’]) or die(mysql_error());
$res = mysql_fetch_array($count);
$obj->reviewcount = $res[‘COUNT(id)’];
if (4 == $row[‘genre’])
{
array_push($horror, $obj);
}

if (3 == $row[‘genre’])
{
array_push($fantasy, $obj);
}
if (2 == $row[‘genre’])
{
array_push($sciencefiction, $obj);
}
if (1 == $row[‘genre’])
{
array_push($urban, $obj);
}

}
Output(“Science Fiction”, $sciencefiction);
Output(“Fantasy”, $fantasy);
Output(“Urban Fantasy”, $urban);
Output(“Horror”, $horror);

?>

One Comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.