[repo.professor] prevent wrong statements to be executed

This commit is contained in:
xdrm-brackets 2018-03-04 12:05:10 +01:00
parent 99351cb8ab
commit 821edf3f70
1 changed files with 3 additions and 0 deletions

View File

@ -180,6 +180,7 @@ class professor extends Repo_i {
$st = $this->pdo->prepare("SELECT * FROM `Professeur`$cond GROUP BY abreviation ASC");
/* (3) Bind params and execute statement */
if( is_bool($st) ) return [];
$success = $st->execute($parm);
/* (4) Manage error */
@ -270,6 +271,8 @@ class professor extends Repo_i {
Prof.idProfesseur;");
/* (3) Bind params and execute statement */
if( is_bool($st) ) return [];
$success = $st->execute($parm);
/* (4) Manage error */