I want to show all distinct id_did in cc_did_use
function getdidbycc($cccard_from_sipcard){
$result = mysql_query("SELECT id_did from cc_did_use where id_cc_card='$cccard_from_sipcard'");
if ($row = mysql_fetch_array($result))
{
$text = $row['id_did'];
}
return $text;
}
I have two id_cc_card="31"
and one that value has id_dd="14"
and another one = "13"
but result just show first one.
How I can show both of them?
and after that I have another function
function get_did ($p){
$result = mysql_query("SELECT did FROM cc_did WHERE id ='$p'");
while ($row = mysql_fetch_array($result))
{
echo $row['id_did'].'<br/>';
}
}
when I run getdidbycc function , it returns two value , 13 and 14 , How I can get did numbers from this two values?