codetime为时间格式为Unix时间戳
基本原理就是当前时间减去数据库时间计算秒数,然后
SELECT recordcode,codetime,(300-(UNIX_TIMESTAMP(NOW())-codetime)) as opentime FROM `lotteryrecord` WHERE `codestatus` =1
codetime为时间格式为Unix时间戳
基本原理就是当前时间减去数据库时间计算秒数,然后
SELECT recordcode,codetime,(300-(UNIX_TIMESTAMP(NOW())-codetime)) as opentime FROM `lotteryrecord` WHERE `codestatus` =1