I would greatly apreciate any of you brilliant coders out there could help me with this. My coding expertise in mysql/php is limited but I am stubborn.
So far: This successful query below gives the number of employees that have 'severe' in only one column 'rsmed' for the business named 'zmon', I now need to count 'severe' from multiple columns for the business 'zmon':
$host="localhost";
$username="user";
$password="pass";
$db_name="dbase";
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
$query = "SELECT COUNT(*) FROM forearm WHERE business='zmon' AND rsmed = 'severe' ";
$result = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($result))
{
echo "There are ". $row['COUNT(*)'] ." employees severe in rsmed.";
}
I am stuck here: I need to count the number of 'severes' in multiple columns (rslat, rsmed, rscentral, rselbow) in the table named 'forearm' for the business named zmon.
So, column business contains a name of a business. The same business can have multiple rows each corresponding to different employees of theirs. The other columns (rslat, rsmed, rscentral, rselbow) contain any of 4 variables: Not significant, low, medium, high and severe.
I hope that is enough information for you.
Thanks, Paul