ma che db hai?
non mi pare molto bello!
comunque ..
sql= "select substring(id,instr(id,'-'".$id."'(')+1,instr(substring(id,instr(id,'-'".$id."'(')+1),'('))-1) from tabella where campo LIKE ....."