Execution requete avec les paramètres

This commit is contained in:
Michael RICOIS 2016-11-22 14:47:41 +01:00
parent 78c876967a
commit a25f27dc9f

View File

@ -243,7 +243,9 @@ class Gestion extends Scores_Ws_Server
//Get user infos
$sql = "SELECT * FROM sdv1.utilisateurs WHERE login = :login";
$stmt = $this->conn->executeQuery($sql);
$stmt = $this->conn->prepare($sql);
$stmt->bindValue('login', $login);
$stmt->execute();
//isExist
if ($stmt->rowCount() == 0) {
@ -510,6 +512,7 @@ class Gestion extends Scores_Ws_Server
array('login' => $login));
}
catch (\Doctrine\DBAL\DBALException $e) {
file_put_contents('test.log', $e->getMessage());
if ($this->User->idClient == 1) {
throw new SoapFault('ERR', $e->getMessage());
}