The scenario is to list the photos uploaded by an User and his friends sorted by upload datetime. I have a MySql table Photo which is dynamic and contains the photos uploaded by all users.
Initially i get 10 rows of data by the below query. By the time i get next 10 rows, users will have uploaded more photos. So how can i select the next 10 rows starting from the row i already got before?
select * from photo p where p.handle in (select handle from friends where user = '$handle') or p.handle='$handle' order by uldatetime desc limit ".$start.", 10;
WHEREclause selecting only photos with a higher ID.