Код: Выделить всё
import mysql.connector
conn = mysql.connector.connect()
cur = conn.cursor()
cur.execute('SELECT GREATEST(CEILING(Tot_Weight + 3.4),4.5) FROM TestTable order by id asc;')
print(cur.fetchall())
Код: Выделить всё
Wt1 = 7.02
Wt2 = 5.4
cur.execute('SELECT GREATEST(CEILING(Tot_Weight +'+ Wt1 +')', Wt2 +') FROM TestTable order by id asc;')
print(cur.fetchall())
TypeError: can only concatenate str (not "float") to str
Подробнее здесь: https://stackoverflow.com/questions/788 ... estceiling
Мобильная версия