I'll try.
You have in your line 5:
Every time that loop happens $line stores one record from your table. $line is an assoc array and I will assume that records id name is Id (this could be different).
So every iteration you select one record from the table and its id is held in $line['Id']. All you have to do is to store it every time and keep it for later. There is few ways you can do that but I would store it within array like this:
Once the looping is over $ids holds all id's you need to check. To use them in your WHERE clause you can implode array like this:
finally your sql update would look something like this.
I hope this helps. Good luck.
You have in your line 5:
Code:
.....
while($line = mysql_fetch_assoc($query909)) {
....
So every iteration you select one record from the table and its id is held in $line['Id']. All you have to do is to store it every time and keep it for later. There is few ways you can do that but I would store it within array like this:
Code:
$ids = array();
while($line = mysql_fetch_assoc($query909)) {
$ids[] = $line['Id'];
......
}
Code:
$ids_str = implode(",", $ids);
Code:
UPDATE ........whatever you need to update ........ WHERE Id IN ($ids_str)
Comment