Well the function looks like:

function LookUpIdById($parent_id,$child_id)
{
$where = "where PARENT_ID=$parent_id and CHILD_ID=$child_id ";
return($this->LookUpOneColumn("ID",$where));
}

It works fine if i put in the numbers but not the variables like I said I will try that int function :-)