Multi line of $wpdb->query just run 1 time and end the loop right after

Multi line of $wpdb->query just run 1 time and end the loop right after

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