acctman
09-01-2008, 07:23 PM
Hi, the current code I wrote below looks up one user ID (m_id = 39) and processes it, how would I process all rows in table rate_mem?
$res = mysql_query("SELECT m_addtn FROM rate_mem WHERE m_id = '39'");
$results = mysql_fetch_array($res,MYSQL_BOTH);
$decode = unserialize(base64_decode($results['m_addtn']));
$m_orientation = $decode['3'];
$m_status = $decode['6'];
$m_turn_on = $decode['4'];
$m_turn_off = $decode['1'];
mysql_query ("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 = '39'");
$res = mysql_query("SELECT m_addtn FROM rate_mem WHERE m_id = '39'");
$results = mysql_fetch_array($res,MYSQL_BOTH);
$decode = unserialize(base64_decode($results['m_addtn']));
$m_orientation = $decode['3'];
$m_status = $decode['6'];
$m_turn_on = $decode['4'];
$m_turn_off = $decode['1'];
mysql_query ("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 = '39'");