Ok, say we have 50 records. we want to show 10 at a time.. what would be the best way to process this..
1) Using the LIMIT function?
eg
$query = "SELECT * FROM customers LIMIT $start,$end";
SELECT * FROM customers LIMIT 0,10
2) Using the mysql_data_seek() function?
eg
$query = "SELECT * FROM customers";
$results = mysql_query($query);
mysql_data_seek($results,$startRow-1);
I ask because, mysql_data_seek seems to be more convinient specially in complex filtering situations.. however, thinking about selecting ALL records first whithout limits then parsing the 10 current rows seems to be overkill or something.. Say i had 10,000 records.. and i need to show 10 each time.. the 2) method seems to be slower or inefficient because it retrieves ALL the records regardless of the display requirements..or doest it not work this way?
Would luv to hear your thoughts.
tea