|
Posted by Bill Tripple on 09/28/05 06:27
add "LIMIT 3" to your sql statement
SELECT * FROM `MyTable` where Name = 'someone' ORDER BY `Date` ASC LIMIT
3,1;
<listerofsmeg01@hotmail.com> wrote in message
news:1127817609.710183.75060@o13g2000cwo.googlegroups.com...
> OK, I have tried reading the manual on this one, but I cannot work it
> out. Probly easy for a SQL veteran...
>
> I need to get the position (ie 3rd from top - 3) of a particular record
> FROM AN ORDERED RESULT SET.
>
> In other words, I need to do something like:
> SELECT "position or whatever the magic word is" from (SELECT * FROM
> MyTable ORDER BY Date) where Name = "someone";
>
> So given "someone", I want to find out how recent their entry is (eg
> 3rd most recent).
>
> Thanks,
> Lister
>
[Back to original message]
|