- This topic has 1 reply, 1 voice, and was last updated 1 month ago by .
Hi, my php is limited, i just notice that if i delele Custom Field Group with enabled MB Custom Table in wp-admin/edit.php?post_type=meta-box
i will cannot use $wpdb->insert to that Custom table wp_test.
$table = $wpdb->prefix.'test'; $data_all = array( 'tk_owner' => $user_id, 'tk_name' => $tk_name, 'tk_email' => $tk_email, 'tk_mobile' => $tk_mobile, 'tk_address' => $tk_address, 'tk_others' => $tk_others, 'tk_family' => $tk_family, 'tk_family_mobile' => $tk_family_mobile, ); $format = array('%s','%s'); $wpdb->insert($table,$data_all,$format);
If array below 4, wpdb->insert will works:
$data_all = array( 'tk_owner' => $user_id, 'tk_name' => $tk_name, 'tk_email' => $tk_email, 'tk_mobile' => $tk_mobile, );
I already generated and added PHP Code to theme functions.php for that custom field group from Metabox
Any idea why this wpdb->insert cannot insert new row ??
- You must be logged in to reply to this topic.