here sample of the formulas: Golden: xxxxxx, xxxyyy, ... Silver: xyxyxy, xxyyxx, ... On Fri, Feb 6, 2009 at 4:05 PM, Hari KT <kthari85@xxxxxxxxxxx> wrote: > Which formulas ? > If you have a formula then its easy to do right ? > > Hari K T > > http://www.harikt.com/ > http://ijust4u.blogspot.com/ > > --- On Fri, 6/2/09, Mohammad Al-Naji <mnaji.qx@xxxxxxxxx<mnaji.qx%40gmail.com>> > wrote: > From: Mohammad Al-Naji <mnaji.qx@xxxxxxxxx <mnaji.qx%40gmail.com>> > Subject: Re: Numbers classifications > To: php-objects@xxxxxxxxxxxxxxx <php-objects%40yahoogroups.com> > Date: Friday, 6 February, 2009, 12:18 PM > > let me clear it better, i have a list of mobile numbers, more than a > > million. i need to classify all the numbers according to a list of > formulas, > > i have more than 100 formula to classify the numbers like the examples i > > mentioned before, all the numbers that achive the Golden formulas will be > > Golden number, and the same for silver, ... > > the way in my mind to to tokenize all the degits of the numbers and compare > > according to the formulas, is there another way to do that? > > thanx in advance... > > On Thu, Feb 5, 2009 at 12:12 PM, Suman Rai <sumanraic001@ yahoo.com> > wrote: > > > Complete code here > > > > > > <?php include("connection .php");?> > > > > > > <?php > > > $sql="SELECT * FROM Table_Cat"; > > > $result=mysql_ query($sql) or die(mysql_error( )); > > > $count=mysql_ num_rows( $result); > > > if($count>=1) { > > > while ($row = mysql_fetch_ assoc($result) ) { > > > > > > $sql2="SELECT * FROM AnotehrTableNameWhe reCatIDStored" ; > > > > > > $result2=mysql_ query($sql2) or die(mysql_error( )); > > > > > > $total=mysql_ num_rows( $result2) ; > > > echo $row['Name'] ."(".$total. ")"; > > > > > > } > > > > > > } > > > > > > Regards & Thank You, > > > > > > Suman K. Rai > > > Cell: +977 98040 25616 > > > rai.suman@yahoo. com <rai.suman%40yahoo. com> | sumanrai1980@ gmail.com<sumanrai1980% > 40gmail.com> > > > www.raisuman. myplace.com > > > > > > --- On Thu, 2/5/09, Hari KT <kthari85@yahoo. co.in <kthari85%40yahoo. > co.in>> > > > wrote: > > > > > > From: Hari KT <kthari85@yahoo. co.in <kthari85%40yahoo. co.in>> > > > Subject: Re: Numbers classifications > > > To: php-objects@ yahoogroups. com <php-objects% 40yahoogroups. com> > > > > Date: Thursday, February 5, 2009, 1:39 AM > > > > > > I dont get u completely . > > > > > > Golden: xxxxxx, xxxyyy, ... > > > > > > Silver: xyxyxy, xxyyxx, ... > > > > > > <?php > > > > > > $str = "xyxyxy"; > > > > > > $first = substr( $str , 0 , 1 ); //Get frst char > > > > > > $second = substr( $str , 1 , 1 ); //get 2nd char > > > > > > if( strncmp( $str , $first.$first. $first , 3 ) == 0 ) { > > > > > > //Golden() > > > > > > } else { > > > > > > //Silver() > > > > > > } > > > > > > ?> > > > > > > I have not tried it in my localhost . Plz do chk. And let me know is this > > > what you need ? :) > > > > > > With Love > > > > > > Hari K T > > > > > > For more visit http://www.harikt. com/ > > > > > > http://ijust4u. blogspot. com > > > > > > --- On Thu, 5/2/09, Mohammad Al-Naji <mnaji.qx@gmail. com> wrote: > > > > > > From: Mohammad Al-Naji <mnaji.qx@gmail. com> > > > > > > Subject: Numbers classifications > > > > > > To: php-objects@ yahoogroups. com > > > > > > Date: Thursday, 5 February, 2009, 12:22 PM > > > > > > Hi, > > > > > > I need a function that classify a list of numbers into groups like > (Silver, > > > > > > Golden, ...) according to pre-defined formulas like: > > > > > > Golden: xxxxxx, xxxyyy, ... > > > > > > Silver: xyxyxy, xxyyxx, ... > > > > > > Anybody can help in that? > > > > > > -- > > > > > > Kind Regards, > > > > > > Mohammad Al-Naji > > > > > > [Non-text portions of this message have been removed] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Add more friends to your messenger and enjoy! Go to http://messenger. > > > yahoo.com/ invite/ > > > > > > [Non-text portions of this message have been removed] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > [Non-text portions of this message have been removed] > > > > > > > > > > > -- > > Kind Regards, > > Mohammad Al-Naji > > [Non-text portions of this message have been removed] > > > > > > > > > > > > Add more friends to your messenger and enjoy! Go to > http://messenger.yahoo.com/invite/ > > [Non-text portions of this message have been removed] > > > -- Kind Regards, Mohammad Al-Naji [Non-text portions of this message have been removed]