What is the proper way to create a custom table and store data for custom fields that contain groups with nested fields?
I have created a meta box with the Builder. The meta box has a number of groups that each contain one or more fields.
When I choose not to use a custom table, WordPress stores each group's data in the wp_postmeta table. The group's name becomes the meta_key and the group's data is serialized (I believe) and stored as text in meta_value.
In my attempt to store the data is a custom table I tried to emulate that by creating columns for each group like:
MB_Custom_Table_API::create( "{$prefix}table_name", array(
'group1' => 'TEXT NOT NULL',
'group2' => 'TEXT NOT NULL',
'group3' => 'TEXT NOT NULL'
) );
But that does not seem to work, so now I wonder if there is a different way I should be doing it.