예제 #1
0
 /**     
  * @param Analyse $analysis
  * @return ArrayObject 
  */
 public function getCommentsOfAnAnalysis(Analyse $analysis)
 {
     $statement = "SELECT comment.*, users.name AS nameUser FROM comment \r\n            LEFT OUTER JOIN users ON comment.username = users.username\r\n            WHERE analysis_id = :id ORDER BY datetime DESC";
     $query = $this->session->prepare($statement);
     $query->bindParam(":id", $analysis->id());
     $query->execute();
     return $this->buildArrayComments($query->fetchAll(PDO::FETCH_ASSOC));
 }
예제 #2
0
 public function getAnalysisId()
 {
     return $this->analysis->id();
 }