You are here: Re: Newbie - finding ordered position « PHP SQL « IT news, forums, messages
Re: Newbie - finding ordered position

Posted by listerofsmeg01 on 09/28/05 12:07

Stefan Rybacki wrote:
> Its easy in your special case. Just count the entries with newer or older dates and you
> know the position.
>
> for older:
>
> SELECT count(*) FROM table WHERE date<(SELECT date FROM table WHERE name="someone")
>
> for newer:
>
> SELECT count(*) FROM table WHERE date>(SELECT date FROM table WHERE name="someone")
>
>
> Regards
> Stefan

Thanks a million. It's obvious now you've shown me! Durr.

Thanks for everyone else's replies too, although I think some of you
got the wrong end of the stick in what I wanted. I want a position
given a name, not a name given a position.

Thanks again,
Lister

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация