displayin results of sql query
Posted: Sun Mar 22, 2009 1:30 pm
Hi Guys,
Below is part of my code, and I wanted to know how I can display the results as a html table with Job_Name, Skill_Name, Person Name, Skill_Name and Total as the columns
Thanks
Below is part of my code, and I wanted to know how I can display the results as a html table with Job_Name, Skill_Name, Person Name, Skill_Name and Total as the columns
Code: Select all
$sql= "SELECT
Person_ID.Person_Name, Person_Skill.Skill_name, (Person_Skill.Score-ID_Table.Weight) AS total, Job_ID.Job_Name, ID_Table.Skill_Name
FROM
Job_ID
JOIN ID_Table
USING (Job_ID)
JOIN Person_Skill
USING (Skill_Name)
JOIN Person_ID
USING (Person_ID)
ORDER BY
total
DESC";
$result = mysql_query($sql)
or die ("Couldn't execute query.");
while ($row=mysql_fetch_array($result))
{
}