我发现这段代码可在mysql中更新另一个表格的表
case 3
我将此代码放在php页面中
UPDATE `tabel_overzicht` set indoor_km = (select sum(indoor_km) as total FROM `Fietsen_2018` WHERE datum LIKE '%/11/%'), outdoor_km = (select sum(outdoor_km) as total FROM `Fietsen_2018` WHERE datum LIKE '%/11/%'), indoor_hoogte = (select sum(indoor_hoogte) as total FROM `Fietsen_2018` WHERE datum LIKE '%/11/%'),outdoor_hoogte = (select sum(outdoor_hoogte) as total FROM `Fietsen_2018` WHERE datum LIKE '%/11/%'),totaal_km = (select sum(indoor_km) + sum(round(outdoor_km)) as total from Fietsen_2018 WHERE datum LIKE '%/11/%'),totaal_hoogte = (select sum(indoor_hoogte) + sum(round(outdoor_hoogte)) as total from Fietsen_2018 WHERE datum LIKE '%/11/%') where maand = "11-nov"
但是当我启动我的php页面时,出现错误
此页面无法正常运行。www.bruggie.be当前无法处理此请求。 HTTP错误500
答案 0 :(得分:0)
我在您的代码中看到了一个右花括号},但是没有一个空缺。也许是导致错误的原因。