acctman Posted September 1, 2008 Share Posted September 1, 2008 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'"); Link to comment https://forums.phpfreaks.com/topic/122263-using-foreachloop-on-a-query/ Share on other sites More sharing options...
acctman Posted September 1, 2008 Author Share Posted September 1, 2008 can anyone assist me or atleast point me in the direction of a site that has examples for doing something like this? Link to comment https://forums.phpfreaks.com/topic/122263-using-foreachloop-on-a-query/#findComment-631445 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.