@ -75,10 +75,15 @@ class FaqModel
|
||||
return $result['id'];
|
||||
}
|
||||
|
||||
public function addQuestion(int $room_id, string $question)
|
||||
/**
|
||||
* @param int $room_id
|
||||
* @param string $question
|
||||
* @param string $nickname
|
||||
*/
|
||||
public function addQuestion(int $room_id, string $question, string $nickname )
|
||||
{
|
||||
$stmnt = Database::getConnection()->prepare( 'INSERT INTO questions ( room_id, question, created_by ) VALUES ( :room_id, :question, :created_by )' );
|
||||
$stmnt->execute( array( 'room_id' => $room_id, 'question' => htmlspecialchars( $question ), 'created_by' => 'Anonymous' ) );
|
||||
$stmnt->execute( array( 'room_id' => $room_id, 'question' => htmlspecialchars( $question ), 'created_by' => $nickname ) );
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user