SELECT CONVERT(zhifubaoAccount,CHAR) as account,CONVERT(userTrueName,CHAR) as userName,CONVERT(money,CHAR) as cashMoney
FROM log
where userId='567' ORDER BY createTime desc limit 1
误区:
SELECT CONVERT(zhifubaoAccount,CHAR) as account,CONVERT(userTrueName,CHAR) as userName,CONVERT(money,CHAR) as cashMoney
FROM log
where state =2 and createTime=(select max(createTime) FROM user_cash_log where userId='567')
and userId='567'