Update database record in plugin
It’s really hard to understand what are you actually doing ( a refactor will help also). but for updating you can try: You will need the $id, show you tell which row to update. $wpdb->update( $wpdb->prefix . ‘tropix_dmin’, array( ‘post_name1’ => $arr), array( ‘id’ => $id ), array( ‘%s’ ), array( ‘%d’ ) );