Re: [Exim] Question about sql.

Pàgina inicial
Delete this message
Reply to this message
Autor: Christopher Chaduka
Data:  
A: Fred C, exim-users
Assumpte: Re: [Exim] Question about sql.
On Friday 05 March 2004 17:41, Fred C. wrote:
> I know, this question a but is off topic in this group. Is more about
> mysql than exim but I am posting it anyway since is for use with exim
> and I think the answer should be useful for others.
>
> I have an existing table for authorizations who look like this.
>
> mysql> select * from b;
> +-------------+------+
>
> | ip          | auth |

>
> +-------------+------+
>
> | 156.24.56.4 | no |
> | 156.24.56.% | yes |
>
> +-------------+------+
> 2 rows in set (0.00 sec)
>
> mysql> select * from b where '156.24.56.9' like ip;


Wrong SQL syntax. Use select auth from b where ip like '156.24.56%';


--
Christopher Chaduka
Technical Department
M-Web Zimbabwe (Pvt) Ltd
http://www.mweb.co.zw