Jump to content

quick help with while loop


aebstract

Recommended Posts

I'm trying to get it to delete every row that has a certain number in a certain column, so I need to run a while for that number in that column, but there could be any number of them so I'm not sure exactly how to do it. Any help in a direction to go with this would be great.



edit: solved with:


[code]
} elseif ($action == deleteall){
$result = mysql_query("SELECT * FROM pmbox WHERE recieverid = '$id'");    
while($r=mysql_fetch_array($result))  {  
mysql_query("DELETE FROM pmbox WHERE recieverid = '$id'");             
}
}
[/code]
Link to comment
https://forums.phpfreaks.com/topic/12235-quick-help-with-while-loop/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.