Error en la consulta:
select `id_cuadromedico` from `cuadromedico` WHERE `id_doctor` = limit 1