Created
November 12, 2009 21:23
-
-
Save dzarezenko/233284 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function addReview($review) { | |
return $this->insertDBObject($review); | |
} | |
public function saveReview($review) { | |
return $this->updateDBObject($review); | |
} | |
public function deleteReview($review) { | |
return $this->deleteDBObject($review); | |
} | |
public function deleteReviewById($reviewId) { | |
$review = new Review(); | |
$review->setId($reviewId); | |
return $this->deleteDBObject($review); | |
} | |
public function getReview($stmt) { | |
return $this->selectDBObject($stmt, "Review"); | |
} | |
public function getReviews($stmt) { | |
return $this->selectDBObjects($stmt, "Review"); | |
} | |
public function getReviewById($reviewId) { | |
$query = "SELECT * FROM reviews WHERE review_id = ?"; | |
$stmt = $this->doSelectQuery($query, "i", array($reviewId)); | |
$review = $this->getReview($stmt); | |
$stmt->close(); | |
return $review; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment