Hi, I have a mysql query that I need help on and hoping someone can give me a hand with this.
currently I have a query that works and the query is:
password_query = SELECT username as user, password, if('%d' IN ('domain1.com', 'domain2.com'), 'quota imap_quota acl imap_acl',null) as userdb_mail_plugins, FROM mailbox WHERE username = '%u'
what I would like to do is have %d be any domain listed (currentl works) but I would also like to have the variable %s be checked if it equals imap.
so if d = domain1.com or domain2.com AND %s = imap pass those values to userdb_mail_plugins otherwise don't.
I would also like to see how "AND NOT %s = imap" query.
thanks so much
paul
currently I have a query that works and the query is:
password_query = SELECT username as user, password, if('%d' IN ('domain1.com', 'domain2.com'), 'quota imap_quota acl imap_acl',null) as userdb_mail_plugins, FROM mailbox WHERE username = '%u'
what I would like to do is have %d be any domain listed (currentl works) but I would also like to have the variable %s be checked if it equals imap.
so if d = domain1.com or domain2.com AND %s = imap pass those values to userdb_mail_plugins otherwise don't.
I would also like to see how "AND NOT %s = imap" query.
thanks so much
paul