Re: Setting up Vacation with custom SQL driver
Sebastian Feltel <[email protected]> Sun, 28 Nov 2010 16:33:42 +0100
| Newsgroups | gmane.comp.horde.sork |
|---|---|
| Message-ID | <[email protected]> |
Hello Jan Am 28.11.2010 14:49, schrieb Jan Schneider: > \U is *not* the email address, it's the full user name. If your user > names don't contain a domain part, \u and \U are the same, and \D is > empty. Okay, so I must construct the needed values with a bunch of mysql queries. Am I able to execute two or more statements at once while enabling or disabling the vacation? Like this: DELETE FROM system.vacation WHERE vacation.email = (SELECT email FROM system.postfix_users WHERE username LIKE \u) AND vacation.active = '1'; DELECT FROM system.postfix_virtual WHERE email LIKE (SELECT email FROM system.postfix_users WHERE username LIKE \u); Setting the queries this way leads to an MySQL error in the horde log. >> Any help or hint is highly appreciated. :-) > > Use CONCAT(): > INSERT into TABLE (username, email, foo, bar) VALUES (\U, CONCAT(\U, > '@domain'), fooval, barvar); Thanks for the hint. :-) Regards, Sebastian -- Sork mailing list - Join the hunt: http://horde.org/bounties/#sork Frequently Asked Questions: http://horde.org/faq/ To unsubscribe, mail: [email protected]