PDA

View Full Version : Help me modify this code !


12-27-2000, 12:07 AM
Does anyone know how to modify the code below so that I can search all the forums except for forumid number 5 for the latest 10 posts ?

Please help.
Thanks !

<html>
<?
require("forum/admin/config.php3");
$num_active = 5;
$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://www.pdasquare.com/forum/showthread.php3?threadid=%d\">%s</a><br>%d views - %d replies</li>", $row[threadid], $row[title], $row[views], $row[replycount]);
} while ($row = mysql_fetch_array($result));
}
?>
<html>

12-27-2000, 12:39 AM
$myselect = "select * FROM thread WHERE forumid<>5 ORDER BY lastpost DESC LIMIT 10";

12-27-2000, 01:31 AM
Thanks Ed,

I think it works now !