我正在尝试运行此查询,以选择status = 1的所有行:
SELECT
acc.id,
acc.user_id,
acc.type,
acc.account,
acc.`status`,
acc.paid,
acc.`password`, CAST(AES_DECRYPT( BASE64_DECODE( `password` ), 'encryption-key') AS CHAR)
FROM acc
WHERE status = status = '1'
但是,它返回所有表,它不会只选择status = 1
的行这可能是语法错误。我确实需要这个
`acc.`password`, CAST(AES_DECRYPT( BASE64_DECODE( `password` ), 'encryption-key') AS CHAR)`
部分所以我可以解密密码。
我做错了什么?
答案 0 :(得分:1)
acc.
附加到所有字段。应该是:
SELECT `id`,
`user_id`,
`type`,
`account`,
`status`,
`paid`,
`password`,
CAST(AES_DECRYPT(BASE64_DECODE(`password`),'encryption-key') AS CHAR)
FROM acc
WHERE status = '1'