I would like to prevent drop-down option duplicate in my edit page..
This is my query:
$res= mysql_query ("SELECT * FROM Acc_skills
INNER JOIN Accounts ON
Accounts.Role_ID = Acc_skills.FK_Role_ID
INNER JOIN Skills ON
Skills.Skills_id = Acc_skills.FK_Skills_ID
WHERE Acc_skills.Acc_skills_id = '$id'");
$row = mysql_fetch_array($res);
Here is my code:
<?php
echo '<option value= '.$row[3].' selected="selected">'.$row[3].' </option>';
echo '<option id="Low" value="Low">Low</option>
<option id="Average" value="Average">Average</option>
<option value="High">High</option>
</select>';
?>
I have managed to pull out the skill level data from my database (Eg, High), however, it shows duplicate drop down option now (Eg, there are 2 "High" options now). As the skill level option is manually typed in, how do i prevent having duplicate drop down options?
Thanks in advance!
SELECT DISTINCT...?