Форум сайта python.su
ffrrelse: username = pyinputplus.inputEmail('Username (must be existing email): ', limit=3) cur.execute('SELECT * FROM database WHERE userID = "' + str(username) + '"') bas = cur.fetchone() print(str(bas[5]))
import sys ... else: username = pyinputplus.inputEmail('Username (must be existing email): ', limit=3) cur.execute('SELECT * FROM database WHERE userID = %s', (username,)) bas = cur.fetchone() if bas is None: print('error: No such user', file=sys.stderr) sys.exit(1) print(str(bas[5]))
Отредактировано py.user.next (Март 29, 2022 23:07:47)
Офлайн