You can do:
SELECT domain FROM domain WHERE domain LIKE "%.co.uk"
which would match anything ending in .co.uk
% is the wildcard.
Ol.
-----Original Message-----
From: Philip Hazel [
mailto:ph10@cus.cam.ac.uk]
Sent: 14 July 2000 20:28
To: Brian K. West
Cc: Nancy Pettigrew; exim-users@???
Subject: Re: [Exim] mysql lookup for relay_domains
On Fri, 14 Jul 2000, Brian K. West wrote:
> You can also use:
>
> SELECT domain FROM domain WHERE domain LIKE SUBSTRING_INDEX('$key', '.',
-2)
and I seem to recall that there is a pattern matching facility in SQL,
isn't there? Can't you look up "ends with" by this means?
--
Philip Hazel University of Cambridge Computing Service,
ph10@??? Cambridge, England. Phone: +44 1223 334714.
--
## List details at
http://www.exim.org/mailman/listinfo/exim-users Exim
details at
http://www.exim.org/ ##