How to Loop
Posted: Sat Mar 14, 2009 7:39 am
Hey Guys
I am trying to loop through my table so all the records where job_ID=1 is displayed, so far I have the code below and it only returns the first value:
So basically I want all the skill_id's and the weights associtated with a particular job_id.
Can anyone help?
I am trying to loop through my table so all the records where job_ID=1 is displayed, so far I have the code below and it only returns the first value:
Code: Select all
$sql2="SELECT * FROM ID_Table WHERE Job_ID IN (SELECT Job_ID FROM Job_ID WHERE Job_ID=$Job_ID1)";
$result3 = mysql_query($sql2)
or die ("Couldn't execute query.");
while ($row3=mysql_fetch_array($result3)){
$Skill_ID=$row3['Skill_ID'];
$Weight=$row3['Weight'];
}Can anyone help?