エラーが発生しています: SQL 構文にエラーがあります。near '){ concat(' Glucose Oxidase', '|', ' 4.2-6.4 mmol/l', '|', 'o'), } を使用する正しい構文については、MySQL サーバーのバージョンに対応するマニュアルを確認してください。 else {' 4 行目
グルコースオキシダーゼ、4.2-6.4 mmol/l、o はフォームから取得されます。
$sql="INSERT INTO adenclinicalchemistry (idclinicalchemistry, Glucose, totalcholesterol, triglyceride, highdensitylipoprotein, lowdensitylipoprotein,
bloodureanitrogen, creatinine, blooduricacid, sgot, sgpt, status, date, patientid, userid)
VALUES ('',
if($exams[0] != ''){
concat('$_POST[glumet]', '|', '$_POST[glunor]', '|', '$_POST[glures]'),
} else {
concat('', '|', '', '|', ''),
}
if($exams[1] != ''){
concat('$_POST[cholmet]', '|', '$_POST[cholnor]', '|', '$_POST[cholres]'),
}else{
concat('', '|', '', '|', ''),
}
if($exams[2] != ''){
concat('$_POST[trimet]', '|', '$_POST[trinor]', '|', '$_POST[trires]'),
}else{
concat('', '|', '', '|', ''),
}
if($exams[3] != ''){
concat('$_POST[himet]', '|', '$_POST[hinor]', '|', '$_POST[hires]'),
}else{
concat('', '|', '', '|', ''),
}
}if($exams[4] != ''){
concat('$_POST[lowmet]', '|', '$_POST[lownor]', '|', '$_POST[lowres]'),
}else{
concat('', '|', '', '|', ''),
}
}if($exams[5] != ''){
concat('$_POST[ureamet]', '|', '$_POST[ureanor]', '|', '$_POST[ureares]'),
}else{
concat('', '|', '', '|', ''),
}
}if($exams[6] != ''){
concat('$_POST[cremet]', '|', '$_POST[crenor]', '|', '$_POST[creres]'),
}else{
concat('', '|', '', '|', ''),
}
}if($exams[7] != ''){
concat('$_POST[uricmet]', '|', '$_POST[uricnor]', '|', '$_POST[uricres]'),
}else{
concat('', '|', '', '|', ''),
}
}if($exams[8] != ''){
concat('$_POST[astm]', '|', '$_POST[astm]', '|', '$_POST[astm]'),
}else {
concat('$_POST[astmet]', '|', '$_POST[astnor]', '|', '$_POST[astres]'),
}
}if($exams[9] != ''){
concat('$_POST[altmet]', '|', '$_POST[altnor]', '|', '$_POST[altres]'),
}else{
concat('', '|', '', '|', ''),
}
'confirm1',
'$date',
'$_POST[patid]',
'" .$_SESSION['user']. "')";