If you have this table:
CREATE TABLE entries (
col1 varchar(100) NOT NULL,
col2 varchar(80) NOT NULL,
col3 varchar(16) NOT NULL,
entry_time timestamp(14),
entID int(5) unsigned zerofill DEFAULT '00000' NOT NULL auto_increment,
PRIMARY KEY (entID),
KEY col2 (col2)
);
//And this variable:
$timeframe = 5;
//here is the select statement:
$result=mysql("$DBName","SELECT col1, col2, col3, entry_time, entID FROM entries WHERE TO_DAYS(NOW()) - TO_DAYS(entry_time) < $timeframe ORDER by entry_time DESC");
--ph