Make Database query only when option is updated

The function update_option includes action hooks that you can use.

Use update_option_{$option_key} as shown here:

function my_func($option, $value) {
  //this is called only when that particular option is updated
  //$option has the option key & $value has the value array
}
add_action('update_option_testimonials_settings', 'my_func', 10, 2);

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)