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 “
“.$val->name.” | pagelink.”\”>”.”Join the discussion ” ; if (0 != $i_commentcount) { //a pullquote //echo “ Comments: “. $i_commentcount.” “; |
“;
}
$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
Pingback: