Auto-update tables from database

qwip,

There is one way to update your custom table while wordpress users table in action and for that you require to code with custom function which is called while some action perform by user. You can handle it by add_action().

There are several action act by wordpress for user(viz. user_register, deleted_user, etc).

See below code example for that:

//The code below that you can add to the Theme Functions file
//For user register action perform then change custom table fields.

add_action('manage_users_columns','custom_modify_user_columns');
function custom_modify_user_columns($user) {
   //update query stuff here
   $wpdb->update( $table, $data, $where, $format = null, $where_format = null );
}

Above code is example for, you can use that structure as per your requirement.

I set some wordpress user action reference URL which would be helpful to you.

Help Reference URL:

  1. user_register
  2. show_user_profile
  3. deleted_user

Hope this helps you.

Thanks!