wordpress query update wp_post

global $wpdb;
$my_post = array(
                      'score'   => $data['score'],
                      'score_by' => $data['scored_by'],
                  );
                 
     

                // Update the post into the database
           
                 $wpdb->update( $wpdb->posts, $my_post, array('ID' => get_the_ID()) );

Related posts:

This entry was posted in wordpress. Bookmark the permalink.