hi all,
wondering how to get precentages sorted out here. Here's my code, the first bit will return 1 & the second part gives value 5.
what i want to do is assign the result of the first code ie 1 to a variable & likewise do the same for second code then do something like (1/5)*100 to calculate the percentage
any ideas?
regards,
Joe
include("dbinfo.inc.php");
mysql_connect($localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query='SELECT COUNT() FROM country where currency_code = "INR"';
$result=mysql_query($query);
$num=mysql_fetch_row($result);
echo 'Total No. of completed migrations = '.$num[0];
//$sum = ($num[0]/10)100;
mysql_close();
include("dbinfo.inc.php");
mysql_connect($localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query='SELECT COUNT(*) FROM country';
$result=mysql_query($query);
$num=mysql_fetch_row($result);
echo 'Total No. of migrations = '.$num[0];
mysql_close();