[prev in list] [next in list] [prev in thread] [next in thread]
List: mysql
Subject: selecting second last row
From: waldo_tumanut () americancentury ! com
Date: 2007-05-30 16:35:13
Message-ID: OFA2638C1B.8736BEA4-ON862572EB.005AA571-862572EB.005B0CD2 () americancentury ! com
[Download RAW message or body]
If there are only two rows that satisfy
SELECT * FROM news WHERE display='yes' ORDER BY id desc
then
SELECT * FROM news WHERE display='yes' ORDER BY id asc limit 1
gives the second row.
Am I missing something?
Waldo Tumanut
Database Analyst
------------------------------------------------------------
CONFIDENTIALITY NOTICE: This electronic mail transmission (including any accompanying \
attachments) is intended solely for its authorized recipient(s), and may contain \
confidential and/or legally privileged information. If you are not an intended \
recipient, or responsible for delivering some or all of this transmission to an \
intended recipient, be aware that any review, copying, printing, distribution, use or \
disclosure of the contents of this message is strictly prohibited. If you have \
received this electronic mail message in error, please contact us immediately by \
electronic mail at emailnotification@americancentury.com and destroy the original and \
all copies of this transmission (including any attachments).
Thank you.
------------------------------------------------------------
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=mysql-marcsub@progressive-comp.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic