Loops running into each other

Pretty simple fix, from what I can tell.. after each “loop” you need to reset your term list..

$term_list="";

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