RE: selecting second last row

2007-05-30 Thread Edward Kay
> SELECT * FROM news WHERE display='yes' ORDER BY id desc limit 1 > > Think this would get the lastest article that is to be displayed > but how do I get the second one. > Just add an offset to the LIMIT clause: SELECT * FROM news WHERE display='yes' ORDER BY id desc limit 1,1 Edward -- My

Re: selecting second last row

2007-05-30 Thread Baron Schwartz
I have a table of publications. -- Table structure for news -- CREATE TABLE `news` ( `id` int(100) NOT NULL auto_increment, `content` longblob, `title` varchar(100) default NULL, `date` date default NULL, `display` varchar(10) default 'no', PRIMARY KEY (