I need to do a computation within my website. I have all parameters but couldn't figure out how to combine them to one result.
Please help me to solute this!
I get the data from mysql database: (shorted)
<?php
$res = mysql_query('SELECT SUM(status) FROM ' . 'success_rate', $con);
if ($row = mysql_fetch_array($res, MYSQL_NUM))
{
$rate = trim($row[0]); ?>
<?php
$res = mysql_query('SELECT Count(*) FROM ' . 'user_registration', $con);
?>
So i get 2 classic params
What I need is to have just one Number in the end. This is how the computation shall work:
((<?= $status ?> / <?= $2nd ?>)*100)-200 = result
Would appreciate your help.