ich lese aus einer Oracle DB Werte aus ,genau 8.
mein sql string sieht wie folgt aus:
Code: Alles auswählen
sql_check = "SELECT country,country_code,region,region_code,city,zip AS zipc,lat,lon FROM TABELLE WHERE IP = '%s' AND LAT IS NOT NULL AND LON IS NOT NULL" % (IP)
curs2.execute(str(sql_check))
check = curs2.fetchone()
Code: Alles auswählen
for country,country_code,region,region_code,city,zipc,lat,lon in check:
COUNTRY = country
COUNTRY_CODE = country_code
REGION = region
REGION_CODE = region_code
CITY = city
ZIP = zipc
LAT = lat
LON = lon
Code: Alles auswählen
ValueError: too many values to unpack
Code: Alles auswählen
('Switzerland', 'CH', None, 'None', 'None', 'None', 47.0, 8.0)
HILFE Bitte werde nicht schlau aus dem ganzen
Danke