|
|
|
@ -45,9 +45,9 @@ class GatewayForm
|
|
|
|
|
|
|
|
|
|
public function assignKeywordToQuestion(string $keyword, string $response, int $idQuestion): void
|
|
|
|
|
{
|
|
|
|
|
$query = "SELECT pr.id
|
|
|
|
|
FROM Propose p, PossibleResponse pr
|
|
|
|
|
WHERE p.question = :id AND p.possibleResponse = pr.id
|
|
|
|
|
$query = "SELECT pr.id
|
|
|
|
|
FROM Propose p, PossibleResponse pr
|
|
|
|
|
WHERE p.question = :id AND p.possibleResponse = pr.id
|
|
|
|
|
AND pr.content = :response";
|
|
|
|
|
$this->connection->executeQuery($query, array(
|
|
|
|
|
':id' => array($idQuestion, PDO::PARAM_INT),
|
|
|
|
@ -65,8 +65,8 @@ class GatewayForm
|
|
|
|
|
|
|
|
|
|
public function deleteKeywordFromQuestion(string $keyword, string $response, Question $question): void
|
|
|
|
|
{
|
|
|
|
|
$query = "SELECT pr.id FROM Propose p, PossibleResponse r
|
|
|
|
|
WHERE p.question = :id AND p.possibleResponse = pr.id
|
|
|
|
|
$query = "SELECT pr.id FROM Propose p, PossibleResponse r
|
|
|
|
|
WHERE p.question = :id AND p.possibleResponse = pr.id
|
|
|
|
|
AND pr.content = :response";
|
|
|
|
|
$this->connection->executeQuery($query, array(
|
|
|
|
|
':id' => array($question->getId(), PDO::PARAM_INT),
|
|
|
|
|