public function getListData() { $sql_query = 'SELECT id,firstname,lastname '; $sql_query .= 'FROM registration '; $db = new Database(); $mysqli = $db->list_query($sql_query); if (!isset($mysqli)) { trigger_error("something goes wrong to fatch data frome database.php" . mysqli_connect_error(), E_USER_ERROR); } return $mysqli; }