Re: [Exim] Opinions sought: Exim and MYSQL

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: pkelly
CC: exim-users
Subject: Re: [Exim] Opinions sought: Exim and MYSQL
On Fri, 9 Jul 1999 pkelly@??? wrote:

> The main reason for not allowing SQL statements in the configure file
> was that the code was a modification of the nisplus query style lookup and
> i didnt really want to deviate to much from a working query style example.
>
>    Also, you would need to do a lot of error checking on the expanded SQL
> statement because any query that returned more than one row of data would
> be very difficult to parse into a format that could be used by exim.


I had the following idea: Allow any SQL statement. If the statement
starts off

SELECT xxx ....

then examine "xxx". If it contains only letters, digits and underscores,
then assume that a single data value is going to be returned and just
pass back that value. Otherwise, assume multiple values and return them
in the key=value format, searching for multiple rows as well.

Does this seem plausible?

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.