Re: Numbers classifications

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> 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 AnotehrTableNameWhereCatIDStored";
>
> $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@xxxxxxxxx <rai.suman%40yahoo.com> | sumanrai1980@xxxxxxxxx<sumanrai1980%40gmail.com>
> www.raisuman.myplace.com
>
> --- On Thu, 2/5/09, Hari KT <kthari85@xxxxxxxxxxx <kthari85%40yahoo.co.in>>
> wrote:
>
> From: Hari KT <kthari85@xxxxxxxxxxx <kthari85%40yahoo.co.in>>
> Subject: Re:  Numbers classifications
> To: php-objects@xxxxxxxxxxxxxxx <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]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux