schooner";
$prefix = "../";
$template = 3;
include("$prefix" . "whp_header.inc");
?>
Could not connect to database server
Check passwords and sockets
");
// select the database
mysql_select_db("$database",$db)
or die("Could not select database $database
Check database name
");
// select recent posts in the database
$result = mysql_query("select *
from $database_table
where showpref = '1'order by year DESC, month DESC, date DESC, id DESC
limit $front_page_max",$db)
or die("Could not select posts
");
// output the current entries
echo("\n\n");
while($row = mysql_fetch_array($result)) {
$the_id = $row["id"];
$the_day = $row["day"];
$the_month = $row["month"];
$the_date = $row["date"];
$the_year = $row["year"];
$the_category = $row["category"];
// testing
// echo("
THE CATEGORY: $the_category
");
// parse out the category id into its string value
$result2 = mysql_query("select *
from $database_table_categories
where id = '$the_category'",$db)
or die("Could not select category
");
while($row2 = mysql_fetch_array($result2)) {
$the_category_name = $row2["category"];
}
// testing
// echo("
THE CATEGORY: $the_category
");
// echo("
THE CATEGORY NAME: $the_category_name
");
$the_showpref = $row["showpref"];
$the_title = $row["title"];
$the_body = $row["body"];
$number_of_comments = $row["number_of_comments"];
// posts
echo("\n\n\n\n");
}
echo("\n\n");
echo("
\n");
// wheatblog code: stop
?>