1. while($stmt->fetch()){
  2.             if($mysqli->errno){
  3.                 throw new Exception('Failed to fetch results', 1)
  4.             }
  5.             else {
  6.                 $data[]=$rslt;
  7.             }
  8. }