PHP/MySQL trouble update in while loop?

Ian

New member
This isn't updating like it should be, it's doing nothing. I know the $getinfo query is returning results but for some reason I can't get it to update the table category... any help?

$getinfo = mysql_query("SELECT * FROM users WHERE points BETWEEN 20 AND 29 AND post='0'");
while($target = mysql_fetch_array($getinfo))
{
$target['id'] = $targetid;
mysql_query("UPDATE users SET post='1' WHERE id = $targetid");
}
I had always thought you were just equating values when you did that, was unaware order mattered.

Thank you thebody44, I'll remember to select your answer as best when it allows me to do so.
 
Back
Top