Nick,
I'm not sure if we're agreeing or not!?
If some selection/restriction can be performed within the database (designed
for efficient data retrieval) rather than when post-processing eg in PHP,
then it will be more efficient/faster. So if something can be done in either
the RDBMS or in PHP, then do it in the database...
I'll send the MySQL solutions (mine, and a better one from someone else) as
previously posted, by private msg.
=dn


> Hi DN.
> If there is a quisker solution is OK to me. But i dont
> know it. I believe that when a user (anybody) inserts
> data in a database, you can sereate the information
> you want that time. Then you just call the results
> from the table (you have them ready) and dont ask the
> server to work for it.
> If you know an other solution, i'll be happy to learn
> it.
> Cheeres
>
>  --- DL Neil <[EMAIL PROTECTED]> &eacgr;&ggr;&rgr;&agr;&psgr;&egr;: >
> 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.



---------------------------------------------------------------------
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

Reply via email to