public function findNextSection(BOL_QuestionSection $section) { if ($section === null) { return null; } $example = new OW_Example(); $example->andFieldGreaterThenOrEqual('sortOrder', $section->sortOrder); $example->andFieldEqual('isHidden', 0); $example->andFieldNotEqual('name', 'about_my_match'); $example->andFieldNotEqual('name', $section->name); $example->setOrder(' sortOrder '); return $this->findObjectByExample($example); }
/** * Returns currently viewed photo index * * @param int $albumId * @param int $id * @return int */ public function getPhotoIndex($albumId, $id) { if (!$albumId || !$id) { return false; } $example = new OW_Example(); $example->andFieldEqual('albumId', $albumId); $example->andFieldEqual('status', 'approved'); $example->andFieldGreaterThenOrEqual('id', $id); return $this->countByExample($example); }