我尝试将字符串传递给我的php脚本。不幸的是我没有得到正确的价值观。我尝试了以下方法:
SELECT g.id,
g.ticket,
g.fac_id,
Cast(g.dts AS DATE) AS dt,
Count(DISTINCT Cast(g.dts AS DATE)) AS days_used
FROM db1.table1 g
INNER JOIN db2.table2 f
ON f.fac_id = g.fac_id
AND g.ticket = '07100103031500002'
AND f.loc IN (80007944, 80007838, 80007998, 80007823)
GROUP BY g.id, g.ticket, g.fac_id, Cast(g.strt_dts AS DATE)
id ticket fac_id dt days_used
FB3CDE6B2FBE42BEA2BAD79CACA70055 07100103031500002 80,007,944 1/2/2016 1
FB3CDE6B2FBE42BEA2BAD79CACA70055 07100103031500002 80,007,823 1/3/2016 1
FB3CDE6B2FBE42BEA2BAD79CACA70055 07100103031500002 80,007,944 7/22/2018 1
FB3CDE6B2FBE42BEA2BAD79CACA70055 07100103031500002 80,007,998 1/2/2016 1
FB3CDE6B2FBE42BEA2BAD79CACA70055 07100103031500002 80,007,838 1/4/2016 1
FB3CDE6B2FBE42BEA2BAD79CACA70055 07100103031500002 80,007,944 1/3/2016 1
}
和我的PHP:
sendEmail(emailbody) {
return this.http.post(this.emailUrl, {
'bname':name,
'bphone':age
});