The app which i am making is going to run on 8 android devices at a time and when the first device runs app i.e fetches the data from web service it should give it the data of 1st ten fields from the data base.
when any other user wants it should give the data of next 10 fields etc but how can i implement this in php web service when i use Limit $i,10 then i initialize $i=0 in the start of web service and the issue is that whenever any user access the web service the same web service code executes i mean that the $i is again reset to 0 in the start what should i do?
I want the when the webservice first access the database the start 10 fileds data is given to it and even ever it accessess the database again the next 10 fields data is given to it and so on...
this is my php webservice code
$i=0;
$q=mysql_query("SELECT * FROM users1 where status='failed' OR status='ready' LIMIT $i,10 ");
while($row=mysql_fetch_assoc($q))
$json_output[]=$row;
echo json_encode($json_output);