0
이 오류를 표시하는 웹 서비스가 있습니다.웹 서비스 업데이트 오류
SQL 구문에 오류가 있습니다. '0', date_de_naissance = '1988-02-02', lieu_de_naissance = '라인 4 { "items": [[succes "]] 근처에서 사용할 올바른 구문에 대해서는 MySQL 서버 버전에 해당하는 설명서를 확인하십시오.
<?php
include('settings.php');
mysql_connect($host,$user,$password);
mysql_select_db($base);
mysql_query('SET CHARACTER SET utf8');
$id_patient = $_GET['id_patient'];
$nom = $_GET['nom'];
$prenom = $_GET['prenom'];
$Sexe = $_GET['Sexe'];
$date_de_naissance = $_GET['date_de_naissance'];
$lieu_de_naissance = $_GET['lieu_de_naissance'];
$adresse = $_GET['adresse'];
$latitude = $_GET['latitude'];
$longitude = $_GET['longitude'];
$telephone = $_GET['telephone'];
$email = $_GET['email'];
$situation_familiale = $_GET['situation_familiale'];
$profession = $_GET['profession'];
$numero_securite_sociale = $_GET['numero_securite_sociale'];
$taille = $_GET['taille'];
$poids = $_GET['poids'];
$groupe_sanguin = $_GET['groupe_sanguin'];
$allergies = $_GET['allergies'];
$antecedents_chirurgicaux = $_GET['antecedents_chirurgicaux'];
$antecedents_medicaux = $_GET['antecedents_medicaux'];
$antecedents_familiaux = $_GET['antecedents_familiaux'];
if ($id_patient!= NULL)
{
$req = "UPDATE patient SET nom = '".$nom."' , prenom = '".$prenom.", Sexe = '".$Sexe."',
date_de_naissance = '".$date_de_naissance."',
lieu_de_naissance = '".$lieu_de_naissance."',
adresse = '".$adresse."',
latitude = '".$latitude."',
longitude = '".$longitude."',
telephone = '".$telephone."',
email = '".$email."',
situation_familiale = '".$situation_familiale."',
profession = '".$profession."',
numero_securite_sociale = '".$numero_securite_sociale."',
taille = '".$taille."',
poids = '".$poids."',
groupe_sanguin = '".$groupe_sanguin."',
allergies = '".$allergies."',
antecedents_chirurgicaux = '".$antecedents_chirurgicaux."',
antecedents_medicaux = '".$antecedents_medicaux."',
antecedents_familiaux = '".$antecedents_familiaux."'
WHERE id_patient = '".$id_patient."' ";
$sql=mysql_query($req);
echo mysql_error();
$items = array("items" => NULL);
$items["items"][] = array("succes");
echo json_encode($items,JSON_UNESCAPED_UNICODE);
}
else{$items = array("items" => NULL);
$items["items"][] = array("erreur");
echo json_encode($items,JSON_UNESCAPED_UNICODE);}
?>
작은 따옴표가 보이지 않습니까? :-) –