Hi
In day 93 the following CODE are used with ReplitDB
offset = 0
try:
offset = db[year]
if offset >200:
db[year] = 0
db[year] += 10
except:
db[year]=10
How do I do the same thing using MySQL?
I am using mysql.connector and I created a table described below.
mysql> desc TwoColINT
→ ;
±-------±--------±-----±----±--------±------+
| Field | Type | Null | Key | Default | Extra |
±-------±--------±-----±----±--------±------+
| year | int(4) | YES | | NULL | |
| offset | int(11) | YES | | NULL | |
±-------±--------±-----±----±--------±------+
2 rows in set (0.01 sec)