Well, I know the database *does* do tons of work behind the scenes to keep it working, and I'm pretty sure PHP does some trickery as well.
Originally posted by HotDog
This is actually a pretty good question, and I don't know. But if PHP does query the whole database and store it in memory before selecting rows $stop to $start, then every time you say mysql_query("SELECT * FROM db") you are doing the same thing and run into the same problem of having to query the whole database, right??
If the information stays in the database until PHP actually calls any data, then this is a moot point. But if not, then a more effecient way would be to come up with a WHERE statement to limit the database query. But as I have stated before, I don't know how query ROW sequence without some sort of refference data. If I could say WHERE ROWS BETWEEN 5 AND 10 that would be great!!
Like I said, if someone else has found a SQL work around for this, I'd love to know it. I think this would be important to know how to do since MySQL is the only database (that I know of) that uses the LIMIT feature. So if there is another way of doing it in a SQL statement, or at least be able to limit you query on the database, it would enable other databases to emulate the LIMIT feature.
But once again, if PHP doesn't hold the whole table query in memory and only selects the rows as they are actually called, then it really shouldn't make any difference, right??
<Edited by HotDog on 01-31-2001 at 03:53 PM>