Ejemplo n.º 1
0
 public static function SearchFull($query, $maxRows)
 {
     $conn = RPDatabase::createConnection();
     $query = "%{$query}%";
     $statement = $conn->prepare("SELECT\n      `Room`.`Title`,\n      `Room`.`ID`,\n      `Room`.`Time_Created`,\n      `Room`.`IP`,\n      `Room`.`ID`,\n      `Room`.`Number`,\n      COUNT(*) AS `Found_Count`\n      FROM `Message` LEFT JOIN `Room` ON (\n        `Room`.`Number` = `Message`.`Room_Number`\n      ) WHERE `Message`.`Content` LIKE ?\n      GROUP BY `Room`.`ID`\n      ORDER BY `Found_Count` DESC LIMIT {$maxRows}");
     $statement->execute(array($query));
     return $statement->fetchAll();
 }
Ejemplo n.º 2
0
 public function close()
 {
     RPDatabase::closeGracefully($this->db);
 }