where should I reset query after using get_results?

adding the following fixed the issue

 foreach($query as $sefer){
                $choices = array();
                $inputs = array();

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