I am trying to get some rows from a table that has columns row_ID,c_ID, e_ID, each e_ID can have different c_ID's. I use the mysql_fetch_array to get all c_ID's that are associated to a certain ID.
$result=mysql_query("SELECT c_ID from User_Competence WHERE e_ID=".$id);
$test=mysql_fetch_array($result);
print_r ($test['c_ID']);
But instead of getting several c_IDs for each e_ID, I get only one value in the array. Am I missing something in the query?