acctman
08-29-2008, 08:22 PM
<?php
$dbc = mysql_connect ($db_server, $db_user, $db_pass);
mysql_select_db ($db_name) or die(mysql_error());
$res = mysql_query("SELECT m_addtn FROM rate_members WHERE m_id = '39'");
$results = mysql_fetch_array($res,MYSQL_BOTH);
$decode = unserialize(base64_decode($results['m_addtn']));
print_r($decode);
?>
here's what I still need to do, and maybe you can help me with an all sql coded version that I can process inside of phpmyadmin.
this is the output data from the above query
Array ( [3] => Single [6] => Involved [4] => I ADDED SOME NEW PICS [1] => THEY R IN THE MAIN 4 NOW )
I've created m_status, m_ori, m_turn1 and m_turn2 in the same table as m_addtn. What I want to do is create a loop that will go to each row and decode the m_addtn field then take the 4 arrays with data in them an insert into the fields. So Array[3] would insert into m_status, Array[6] into m_ori, Array[4] into m_turn1 and Array[1] into m_turn2
Can that be done with an all sql code or will i have to use php
$dbc = mysql_connect ($db_server, $db_user, $db_pass);
mysql_select_db ($db_name) or die(mysql_error());
$res = mysql_query("SELECT m_addtn FROM rate_members WHERE m_id = '39'");
$results = mysql_fetch_array($res,MYSQL_BOTH);
$decode = unserialize(base64_decode($results['m_addtn']));
print_r($decode);
?>
here's what I still need to do, and maybe you can help me with an all sql coded version that I can process inside of phpmyadmin.
this is the output data from the above query
Array ( [3] => Single [6] => Involved [4] => I ADDED SOME NEW PICS [1] => THEY R IN THE MAIN 4 NOW )
I've created m_status, m_ori, m_turn1 and m_turn2 in the same table as m_addtn. What I want to do is create a loop that will go to each row and decode the m_addtn field then take the 4 arrays with data in them an insert into the fields. So Array[3] would insert into m_status, Array[6] into m_ori, Array[4] into m_turn1 and Array[1] into m_turn2
Can that be done with an all sql code or will i have to use php
