3 Aug
2010
3 Aug
'10
3:27 p.m.
On Tue, 2010-08-03 at 17:10 +1000, John O'Brien wrote:
What I want to do from the plugin is the following:
UPDATE embedded_device SET PIN=pin_value WHERE username=user;
Questions: Is there a way to locate the exiting database open connection? Is there a way to use the dovecot sql API to set the value of field?
How about doing it via dict API? You can use e.g. dict_set("private/pin", "value") to update the pin. Then configure a dict sql mapping, something like:
map { pattern = priv/pin table = quota username_field = username value_field = pin }
See quota-dict and expire plugins how to use dict.