· 9 years ago · Nov 08, 2016, 09:52 AM
1CREATE TABLE IF NOT EXISTS `mydb`.`Geoloc` (
2 `idGeoloc` BIGINT(40) NULL,
3 `long` VARCHAR(45) NULL,
4 `lat` VARCHAR(45) NULL,
5 `isPlaces` TINYINT(1) NULL,
6 PRIMARY KEY (`idGeoloc`))
7
8with con:
9 cur= con.cursor()
10 if geolocIDplac != '':
11 #geolocplaces
12 cur.execute("INSERT INTO mydb.Geoloc (idGeoloc, long, lat, isPlaces) VALUES (%s, %s, %s, %s);",(geolocIDplac, placelong, placelat, isplaces1))
13 con.commit()
14 else:
15 pass
16
171064, "You have an error in your SQL syntax; check the manual that corresponds to your
18MariaDB server version for the right syntax to use near 'long, lat, isPlaces) VALUES
19(4652869065065635548001, 46.52869065, 6.5635548, 1)' at line 1"