Nick, Understood - but did Carlos say that he is using PHP, and why use PHP when a more efficient/quicker MySQL solution is available? =dn
----- Original Message ----- From: "nick gatsis" <[EMAIL PROTECTED]> To: "DL Neil" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, August 12, 2002 9:06 AM Subject: Re: How to separate different domains on an e-mail database > Its a PHP function my friend. I'm using 3,23... > > --- DL Neil <[EMAIL PROTECTED]> &eacgr;&ggr;&rgr;&agr;&psgr;&egr;: > > Nick, > > Explode: which version of the MySQL manual are you > > using? > > =dn > > > > ----- Original Message ----- > > From: "nick gatsis" <[EMAIL PROTECTED]> > > To: "Carlos Fernando Scheidecker Antunes" > > <[EMAIL PROTECTED]> > > Cc: <[EMAIL PROTECTED]> > > Sent: Friday, August 09, 2002 2:33 PM > > Subject: Re: How to separate different domains on an > > e-mail database > > > > > > > You must create an extra field in your database to > > > store the domain. > > > Use the explode() to seperate the domain from ...@ > > > > > > (array explode (string separator, string string [, > > int > > > limit]) > > > Returns an array of strings, each of which is a > > > substring of string formed by splitting it on > > > boundaries > > > formed by the string separator. If limit is set, > > the > > > returned array will contain a maximum of > > > limit elements with the last element containing > > the > > > whole rest of string. If an empty string ("") is > > > used as the separator argument, then explode() > > will > > > return FALSE. If separator contains a value > > > that is not contained in the string argument, > > > thenexplode() will return the string argument. > > > Note: The limit parameter was added in PHP 4.0.1 > > > Example 1. explode() example > > > $pizza = "piece1 piece2 piece3 piece4 piece5 > > piece6"; > > > $pieces = explode(" ", $pizza); > > > )Form PHP manual > > > Cheers > > > > > > > > > --- Carlos Fernando Scheidecker Antunes > > > <[EMAIL PROTECTED]> &eacgr;&ggr;&rgr;&agr;&psgr;&egr;: > Hello all, > > > > > > > > I've got an e-mail database of our subscribers > > and I > > > > would like to have a > > > > SQL statement do select DISTINCT domains. > > > > > > > > Meaning, I want to know all domains. I whish I > > could > > > > query it so that it > > > > would show me just once each domain, or > > everything > > > > that is after the @ sign. > > > > > > > > Does anyone knows how to query it? > > > > > > > > The e-mail field has 50 chars long. Each user > > > > (whatever is before the @) has > > > > a different lenght off course. So I need to list > > > > just once each domain. > > > > > > > > Any ideas or suggestions? > > > > > > > > Thank you in advance, > > > > > > > > C.F. > > > > > > > > > ____________________________________________________________ > > > Do You Yahoo!? > > > &Agr;&pgr;&ogr;&kgr;&tgr;&eeacgr;&sgr;&tgr;&egr; &tgr;&eegr; &dgr;&ohgr;&rgr;&egr;&aacgr;&ngr; @yahoo.gr &dgr;&igr;&egr;&uacgr;&thgr;&ugr;&ngr;&sgr;&eegr; &sgr;&agr;&sfgr; &sgr;&tgr;&ogr; > > http://www.otenet.gr > > > > > > > > > --------------------------------------------------------------------- > > > Before posting, please check: > > > http://www.mysql.com/manual.php (the manual) > > > http://lists.mysql.com/ (the list > > archive) > > > > > > To request this thread, e-mail > > <[EMAIL PROTECTED]> > > > To unsubscribe, e-mail > > > <[EMAIL PROTECTED]> > > > Trouble unsubscribing? Try: > > http://lists.mysql.com/php/unsubscribe.php > > > > > > > > > > ____________________________________________________________ > Do You Yahoo!? > &Agr;&pgr;&ogr;&kgr;&tgr;&eeacgr;&sgr;&tgr;&egr; &tgr;&eegr; &dgr;&ohgr;&rgr;&egr;&aacgr;&ngr; @yahoo.gr &dgr;&igr;&egr;&uacgr;&thgr;&ugr;&ngr;&sgr;&eegr; &sgr;&agr;&sfgr; &sgr;&tgr;&ogr; http://www.otenet.gr > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php