Re: [Exim] One mysql query

Top Page
Delete this message
Reply to this message
Author: Anand Buddhdev
Date:  
To: Maykel Moya
CC: exim-users
Subject: Re: [Exim] One mysql query
On Wed, Apr 28, 2004 at 04:51:40PM -0400, Maykel Moya wrote:

> Eximers
>
> I've just installed vexim, nice to see the flexibility of ${lookup
> mysql{foo ...
>
> But, if i need to get three different data, I should do three queries,
> even if all data is in the same table, which makes possible to get them
> all in one query.
>
> Is it possible to make just a query and then instruct exim to get the
> data from the yielded row ?


Yes. You can do something like:

${lookup mysql{select column1,column2,column3 ....

And then the variable $address_data will contain:

column1=value1 column2=value2 column3=value3

And you can extract value2 using something like:

${extract{column2}{$address_data}}

--
Anand Buddhdev
Celtel International