go through each column in table and update
Posted: Sun Oct 02, 2005 4:30 am
I am trying to figure out how to do something with php.
basically i have a table with the fields user_id,friend_id,new
i want it to to go through each row where USER_ID = 5 and update the new field to "1"
so far i have something like this
basically i have a table with the fields user_id,friend_id,new
i want it to to go through each row where USER_ID = 5 and update the new field to "1"
so far i have something like this
Code: Select all
if ($row_profile_count > 0) {
$sql = mysql_query("select * from friends where userid='".$_SESSION['session_id']."'");
i know it should be a foreach statement i think
}