[RESOLVED]Getting the next rows

Hello, am designing a personal blog site, when a user clicks on an article, It opens the read-article page, In this read article page, I have a div that is supposed to show the current viewer the top next 5 stories apart from the one currently being read, 

Like, if article with ID (3) is currently being read, the next top 5 articles to show up in the div should be 4-through to 8; but one condition needs to be taken into consideration, the feeds to show depends on if they have being published by the admin…so
there is an IsAdminPublish column with boolean value of False…

Can I get solutions to this please.

select * from articles where ID > 3 and IsAdminPublish = 1

then check in code if there are 5 articles to show


    var sqlQ2 = "SELECT TOP 5 * FROM Articles WHERE Id > @0";
    var info2 = data.Query(sqlQ2, CurrentId);

On the page:

    @foreach(var row in info2){

Leave a Reply