schooner :: arkiv";
$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 year = '$the_year' and month = '$the_month'
order by year DESC, month DESC, date DESC, id DESC",$db)
or die("Could not select posts
");
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"];
// 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"];
}
$the_showpref = $row["showpref"];
$the_title = $row["title"];
$the_body = $row["body"];
$number_of_comments = $row["number_of_comments"];
// post
echo("\n\n");
}
echo("\n\n");
?>