I am trying to update my sql data through $wpdb, but can't... If anyone can help what's the real issue?
$updated_version = $wpdb->update('wp_visitors', array('views' => $updated), array( '%d' ));
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.Sign up to join this community
You're missing your where statement. You need to tell
wpdb which row it should be updating, otherwise you're looking to insert rather than update.
wpdb->update( string $table, array $data, array $where, array|string $format = null, array|string $where_format = null );