The user table is like this:
user_id | key | value
1 option $array
2 other abc
2 option $array
I need to query all user's option field, the value is an array like this:
$array=array('item_id'=>123, 'key1'=>'abc', 'key2'=>'1', 'key3'=>'5',)
Then, to sum all value of key2 in this array.
The only way I can think of is to make a virtual table with each array as one row. Perhaps it's not possible. Then, how can I make the sum for all user's key2 in option field ?