If you go to here you will see the error.
Here is the code, the bolded section is the line in question:
Code: Select all
$category = "";
$getposts = mysql_query("SELECT * FROM $posts_tbl ORDER BY Timestamp DESC LIMIT
$showposts_is");
while ($row = mysql_fetch_array($getposts)) {
$postid = $row[PostID];
$timestamp = $row[Timestamp];
$date = date($postdatepattern_is,$timestamp);
$pagetitle = $row[Title];
$body = $row[Body];
$catid = $row[PostCat];
$catid2 = $row[PostCat2];
$catid3 = $row[PostCat3];
$catid4 = $row[PostCat4];
$comms = mysql_query("SELECT CommID FROM $comments_tbl WHERE PostID=$postid");
$countcomms = mysql_num_rows($comms);
if($catid == "") {$category .= "";} else {
$getcatname = mysql_query("SELECT PostCat, PostCatUrl FROM $postcat_tbl WHERE
PCatID='$catid'");
while ($cat = mysql_fetch_array($getcatname)) {
$category .= "<a href=\"archive.php?cat=$cat[PostCatUrl]\">$cat[PostCat]</a>, ";
}
}
if($catid2 == "") {$category .= "";} else {
$getcatname = mysql_query("SELECT PostCat, PostCatUrl FROM $postcat_tbl WHERE
PCatID='$catid2'");
while ($cat = mysql_fetch_array($getcatname)) {
$category .= "<a href=\"archive.php?cat=$cat[PostCatUrl]\">$cat[PostCat]</a>, ";
}
}
if($catid3 == "") {$category .= "";} else {
$getcatname = mysql_query("SELECT PostCat, PostCatUrl FROM $postcat_tbl WHERE
PCatID='$catid3'");
while ($cat = mysql_fetch_array($getcatname)) {
$category .= "<a href=\"archive.php?cat=$cat[PostCatUrl]\">$cat[PostCat]</a>, ";
}
}
if($catid4 == "") {$category .= "";} else {
$getcatname = mysql_query("SELECT PostCat, PostCatUrl FROM $postcat_tbl WHERE
PCatID='$catid4'");
while ($cat = mysql_fetch_array($getcatname)) {
$category .= "<a href=\"archive.php?cat=$cat[PostCatUrl]\">$cat[PostCat]</a>, ";
}
}
$category = substr($category, 0, -2);
if($category == "") $category = "no category";
$prev_next = NULL;
$prevlink = mysql_query("SELECT PostID FROM $posts_tbl WHERE Timestamp<'$timestamp' ORDER BY Timestamp DESC LIMIT 1");
$prevcount = mysql_num_rows($prevlink);
while ($row = mysql_fetch_array($prevlink)) {$prev = $row[PostID];}
if($prevcount > 0) {$prev_next .= "<a href=\"permalink.php?PostID=$prev\">Previous Post</a> || ";
} else {$prev_next .= "Previous Post || ";}
$nextlink = mysql_query("SELECT PostID FROM $posts_tbl WHERE Timestamp>'$timestamp' ORDER BY Timestamp ASC LIMIT 1");
$nextcount = mysql_num_rows($nextlink);
while ($row = mysql_fetch_array($nextlink)) {$next = $row[PostID];}
if($nextcount > 0) {$prev_next .= "<a href=\"permalink.php?PostID=$next\">Next Post</a>";
} else {$prev_next .= "Next Post";}
$use_template = array("{TITLE}" => $pagetitle,"{POST_ID}" => $postid,
"{DATE}" => $date,"{BODY}" => $body,"{COMMENT_COUNT}" => $countcomms,
"{CATEGORY}" => $category,"{PREV_NEXT}" => $prev_next);
if ($file = implode('', file("template/blog.htm"))) {
foreach($use_template as $key => $value) {
$file=@str_replace($key,$value,$file);
}
echo $file;
}
$category = NULL;
}
Code: Select all
while ($row = mysql_fetch_array($getposts)) {