我正在尝试向一个用户发送邮件,在那里它输出与其位置(存在于数据库中)超链接的患者姓名和医院名称。message body变量只接受字符串医院名称,并且不会附加超链接到其在地图上的位置的医院名称。请帮帮忙。提前感谢
//Take contents of the search box
if($name=file_get_contents('file.txt')) { //create a temp file in bloodonation and take the name from there,then delete the temp file
$multip
我有医生和医院的数据库,还有医院医生表。
我必须列出每个镇的医院数量,但只有有超过5名医生的医院。
SELECT hospital.town, count(town)
FROM hospital
WHERE hospital.id = (
SELECT count(hospital_id)
FROM hospital_doctor GROUP BY hospital_id
HAVING count(hospital_id)>5 )
GROUP BY town
这是我的查询,但是MySQL会返回我的子查询返回超过1行。
医院
医院医生
我应该
我有医院和医学专业。
“我的医疗专业”页面以这种方式按医院ID返回数据:
localhost/MedicalSpecialities/1,1是HospitalID。如果我手动更改链接,我可以访问任何医院的信息。
我有这样的与医院有关联的用户:
我需要查询用户关联的医院ID,并检查当前的HospitalID是否在列表中。
此返回用户已连接的所有医院:
var userID = User.Identity.GetUserId();
var result = db.Hospitals.Include("UserHospitals")
为此,我有三个模型:医院,AspNetUsers,UserHospitals。
这是UserHospitals模型:
public class UserHospital
{
[Key]
public int UserHospitalID { get; set; }
public int HospitalID { get; set; }
public Hospital Hospitals { get; set; }
public string Id { get; set; }
public ApplicationUser Users { get