I don't know where all the php geniuses are today, but seeing as no one has tried to help you yet, here is my attempt. I have no clue about the decode part but I think this might process all rows in the table. I'm just learning php but hopefully this will help. e
Code:
<?php
$sql = " SELECT `m_id` FROM `rate_mem`";
$result = mysql_query($sql,$connection) or die("Couldn't execute $sql query. <br> mysql error: ".mysql_error());
$memberList = array();
while ($row = mysql_fetch_array($result))
{
$member = array();
$member['id'] = $row['m_id'];
$member['m_addtn'] = $row['m_addtn'];
$decode = unserialize(base64_decode($row['m_addtn']));
$m_orientation = $decode['3'];
$m_status = $decode['6'];
$m_turn_on = $decode['4'];
$m_turn_off = $decode['1'];
$sql = "UPDATE rate_members SET
m_orientation = '$m_orientation',
m_status = '$m_status',
m_turn_on = '$m_turn_on',
m_turn_off = '$m_turn_off'
WHERE m_id = '".$member['id']."' ";
$result2 = @mysql_query($sql,$connection) or die("Couldn't execute $sql query. <br> mysql error: ".mysql_error());
$row2 = mysql_fetch_array($result2);
mysql_free_result($result2);
unset($row2);
array_push($memberList, $member);
}
?>
Bookmarks