Here is my query
$invdiff is any number 0 or greater
$sql3 = "SELECT * FROM MYTABLE LIMIT $invdiff";
$result3 = @mysql_query($sql3,$db)
while ($row3 = mysql_fetch_array($result3)) {
$showid= $row3['id'];
}
The problem: I am running this loop several times in my script but each time I run it I want to pull data (a row) that I have not previously pulled.
For example lets say the table has 10 rows
ID
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
First time the query is called it looks like this:
$invdiff is 3
$sql3 = "SELECT * FROM MYTABLE LIMIT $invdiff";
$result3 = @mysql_query($sql3,$db)
while ($row3 = mysql_fetch_array($result3)) {
$showid= $row3['id'];
echo "$showid<br>";
}
OUTPUT will be
1000
1001
1002
Now if I call the query again within the script, the same results will appear. I do not want this. If I call it again, I want this to be the results:
1003
1004
1005
And I can not update the table to flag a field if it appears because it will ruin the data.
Hope this made sense, thanks for any help