how to serialize() mysql update data
Question
Hi I want to make the serialized reading value 1 or 0 in mysql, how can I do
example code
$query = $wpdb->get_results('select * from wp_options where option_id = 96');
$dizi = unserialize($query[0]->option_value);
// echo $dizi['subscriber']['capabilities']['read'];
//print_r($dizi);
if(array_key_exists('read', $dizi['subscriber']['capabilities'])){
echo $dizi['subscriber']['capabilities']['read'] = 0;
}
exit;
0
2 months
0 Answers
13 views
0
Leave an answer
You must login or register to add a new answer .