Reply to Re: Need help with email-match query

Your name:

Reply:


Posted by Steve on 09/12/07 03:33

"axlq" <axlq@spamcop.net> wrote in message
news:fc73hv$q2c$3@blue.rahul.net...
> In article <46e64fd4$0$31120$6e1ede2f@read.cnntp.org>,
> gosha bine <stereofrog@gmail.com> wrote:
>>
>>you can use mysql regular expressions, e.g.
>>
>>select * from users where email rlike 'user([+][^@]+)?@example[.]com'
>
> Cool. That's just what I wanted to know. I feared the answer would
> involve something inefficient like reading in the entire column and
> processing it in php.
>
>>or, if you need this query often create an extra "canonical email"
>>column in the database.
>
> I was thinking of that solution too, but adding a redundant column,
> didn't seem as elegant as constructing a query to work with what I
> have.

i think what he's suggesting is not a redundant column. rather, a normalized
structure. one where an "email address" column contained only email
addresses (minus any other magic data you are combining with it). your "key"
in user+key@domain should be in its own column and given a well fitted name
that describes briefly what "key" is.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация