从数据库中执行值为Latehours1的代码为0.58,我得到的输出为57。
SELECT i.id, i.date, i.input1, i.out1, i.input2, i.out2, i.totalhours,
(FLOOR(latehours1)*60)+FLOOR(((latehours1)-FLOOR(latehours1))*100) AS latehours1,
(FLOOR(latehours2)*60)+FLOOR(((latehours2)-FLOOR(latehours2))*100) AS latehours2,
i.isut, i.`daycs`, i.ishalf, i.`break`FROM temp i WHERE id=123;
设置Latehours1的值后,我的输出为58。
SET @latehours1=0.58;
SELECT (FLOOR(@latehours1)*60)+FLOOR(((@latehours1) - FLOOR(@latehours1))*100) AS latehours