Hello,
I have a table called priest and it has only two fields - priestid and priestname.
I want to pick up the rows where priestid=1, 5, 9, 13, 17,..............till the end of the table
That means I want to pick up every 5th row (difference=4).
In know the statement :
select * from priest where priestid in (1,5,9)
But I want mysql to pick up on its own till the end of the table......I am stuck with this.
The following has not worked either:
$r=1;
$e=1;
while ($e<51)
{
$result = mysql_query("SELECT * FROM priest where priestid limit $r,1");
$r=$r+4;
}
Please help !