在我的项目中,我想要选择提款选项或存款选项的用户的详细信息。我怎么能这样做?
SELECT *
FROM `amount_flow`
ORDER BY id DESC
LIMIT 1
WHERE detail = 'withdraw'
Edit Delete 25 admin 03/03/14 12000 withdraw 3500
Edit Delete 27 hi234 03/03/14 234 withdraw 3266
Edit Delete 29 hifft 03/03/14 213 withdraw 3053 <-
Edit Delete 57 hisat 03/03/14 130 2800
答案 0 :(得分:1)
更改
SELECT *
FROM `amount_flow`
ORDER BY id DESC
LIMIT 1
WHERE detail = 'withdraw'
到
SELECT *
FROM `amount_flow`
WHERE detail = 'withdraw' or detail = 'deposit'
ORDER BY id ASC LIMIT 1