Apply a discount percentage to regular price WooCommerce by function

Ok, maibe I got it:

add_filter('woocommerce_get_price_html', 'custom_price', 10, 2);
function custom_price( $price, $product ) {
  $price="from ";
  $price .= '<del>' . woocommerce_price($product->regular_price *= 1) . '</del> ';
  $price .= woocommerce_price($product->regular_price *= 0.9);
    $price .= ' per day';
  return $price;
}

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