- <?php
- class ImageRepository extends BaseRepository implements IImageRepository {
- public static function GetImagesByAlbum($albumId) {
- $images=array();
- $prep=self::$PDO->prepare("SELECT image_id FROM images WHERE album_id=? AND image_deleted=0");
- $prep->execute(array($albumId));
- while ($imageId=$prep->fetchColumn())
- $images[]=new Image($imageId);
- return $images;
- }
- }
|