created fetch_all method for mysqli for compatibility because older versions of php doesn't have this method for mysqli