I’m trying to fill a page with content from a database. My thinking is, to use some kind of while loop in php and go through each row in the database and use jQuery’s .prepend command to add it below the other content.
The problem I’m seeing in this, is that every time the page is loaded it would be pretty resource intensive to have to load through every row in a table and display it.
I was thinking that when I display the item I should then change a value in the table that indicates that it is already displayed and therefore keep the current content. My problem with this is, how exactly would I keep this content there if it’s dynamically added like this?
Or is there just a better way in general to do this?
Keep track of which entry #s you’ve already stored and deal with the new stuff using sql’s limit function.