Re: Numbers classifications

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

 



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 | sumanrai1980@xxxxxxxxx
www.raisuman.myplace.com


--- On Thu, 2/5/09, Hari KT <kthari85@xxxxxxxxxxx> wrote:

From: Hari KT <kthari85@xxxxxxxxxxx>
Subject: Re:  Numbers classifications
To: php-objects@xxxxxxxxxxxxxxx
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]


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

  Powered by Linux