<?php
function count_data($count,$count2)
{
include("dbconnect.php");
$query = "
SELECT
COUNT(status_id) as total
FROM
jobhelpdesk
INNER JOIN member ON (jobhelpdesk.mem_id = member.mem_id)
INNER JOIN department ON (member.department_id = department.department_id)
WHERE
department.department_id ='$count' AND
status_id = '$count1'
";
$result = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_assoc($result))
return $count;
}
echo $row['count_data(7,1)'] ;
?>