$wpdb->insert produces “ Duplicate entry '0-0' for Key '1' ”
问题 I'm writing a plugin and trying to insert a new row into the wp_term_relationships table inside of a foreach loop. I know the variables have values because of a var_dump, but for some reason, I'm getting an error consistently. This shows up about 600 times on the show_errors() function: WordPress database error: [Duplicate entry '0-0' for key 1] INSERT INTO wp_term_relationships ( object_id , term_taxonomy_id , term_order ) VALUES ('','','') My Code: foreach ($cb_t2c_cat_check as $values) {