1
SELECT CONCAT('maildir:/var/vmail/',maildir) AS mail,
       5000 AS uid, 
       5000 AS gid 
FROM mailbox 
INNER JOIN domain 
WHERE username = 'test@example.com'
  AND mailbox.active = '1'
  AND domain.active = '1'   

このクエリの何が問題になっていますか? Postgresql は次のように述べています。

'ERROR:  syntax error at or near "WHERE" 
LINE 1: ...S uid, 5000 AS gid FROM mailbox INNER JOIN domain WHERE user...'
4

1 に答える 1

0

これを試して

SELECT CONCAT('maildir:/var/vmail/',maildir) AS mail,
       5000 AS uid,
       5000 AS gid
FROM mailbox
INNER JOIN DOMAIN on
  username = 'test@example.com'
  AND mailbox.active = '1'
  AND DOMAIN.active = '1'
于 2014-12-04T22:46:04.287 に答える