Re: Setting up Vacation with custom SQL driver
Jan Schneider <[email protected]> Mon, 29 Nov 2010 10:13:06 +0100
| Newsgroups | gmane.comp.horde.sork |
|---|---|
| Message-ID | <[email protected]> |
Zitat von Sebastian Feltel <[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. No, this is not possible. >>> 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] > Jan. -- Do you need professional PHP or Horde consulting? http://horde.org/consulting/ -- Sork mailing list - Join the hunt: http://horde.org/bounties/#sork Frequently Asked Questions: http://horde.org/faq/ To unsubscribe, mail: [email protected]