Quote:
Originally posted by Mental Stamina
<?
require("admin/config.php");
$num_active = 10;
$db=mysql_connect($servername,$dbusername,$dbpassw ord);
mysql_select_db($dbname);
$twentyfourhours= 24*60*60;
$date1 = time() - $twentyfourhours * 1;
$myselect = "select * FROM thread ORDER BY lastpost DESC LIMIT 10";
$result = mysql_query($myselect);
if ($row = mysql_fetch_array($result)) {
do {
printf("<li><a href=\"http://64.177.89.7/boards/showthread.php?threadid=%d\">%s</a><br>%d views - %d replies</li>", $row[threadid], $row[title], $row[views], $row[replycount]);
} while ($row = mysql_fetch_array($result));
}
?>
that's it...
change this number if you want to change the number of topics displayed
$num_active = 10;
peace...
|
Hi Mental Stamina,
I am trying to do what you wrote but I am getting a message telling me I have a Parse error: parse error, expecting `T_VARIABLE' or `'$''
Do I have to change something at
$date1 = time() - $twentyfourhours * 1; ?
Thanks for any help!
Olly