I want to display the from selected in a database based on the number of applications jobs in this form
job Name(number of applications)
for example Accountant(4),Driver(2)
Here is the query of selecting from a database $sql=mysql_query("SELECT applications.*, jobs.jname FROM applications
LEFT JOIN jobs ON jobs.jobID = applications.jobID ");
I have tried
$jobApplication_list="";
$sql=mysql_query("SELECT applications.*, jobs.jname FROM applications
LEFT JOIN jobs ON jobs.jobID = applications.jobID ");
$jobCount= mysql_num_rows($sql);//count the output amount
global $jobCount;
if($jobCount > 0){
while($row=mysql_fetch_array($sql)){
$jobname=$row["jname"];
$countt=(count($appID= $row["id"]));
$jobApplication_list .='
<tr><td>'.$jobname.'('.$countt.')</td></tr> ';
}
}`
But im not getting the required results What I'm getting is this
Accountant(1) Programmers(1) Programmers(1) Not that I don't want the job name e'g programmer to repeat i want job name to repeat i want the number to increase eg programmer(2)..(3)..on and on Any Assistance will be appreciated