468,544 Members | 1,776 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,544 developers. It's quick & easy.

Most 4 Viewed news or somthing script in asp

I have a table called News and each News have a Views value. In my table there are many rows of News. How do I to print the 4 most popular/viewed News?
Apr 5 '10 #1
2 1330
jhardman
3,405 Expert 2GB
It depends on what type of db you use, for example, in SQL Server use this
Expand|Select|Wrap|Line Numbers
  1. set rowcount=4; select * from news order by views desc
Does this answer your question?

Jared
Apr 10 '10 #2
maybe thx..
Apr 10 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by IkBenHet | last post: by
1 post views Thread by Colleen | last post: by
5 posts views Thread by Alec | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.