在我的项目中,我想要选择提款选项或存款选项的用户的详细信息。我怎样才能做到这一点?
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
最佳答案
改变
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
关于php - 选择 MySQL 表中倒数第二个数字,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22144061/