Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Initial, query brands, comments pt fiecare oferta
- <?php
- foreach ($offers as $offer) {
- $offers_ids[] = $offer['offer_id'];
- $offerComments[$offer['offer_id']] = $tbOfferComment->getOfferComments($offer['offer_id']); // apelare pt luat comments
- $offerBrands[$offer['offer_id']] = $brandOfferTable->getBrandsByOfferId($offer['offer_id']); // apelare pt luat brands
- $members = $offerRestrictionTb->fetchRow(array('offer_id = ?' => $offer['offer_id'], 'restriction_type_id = ?' => 4));
- if ($members) {
- $offerMembers[] = $members->offer_id;
- }
- }
- ?>
- #
- <?php
- $offerIds = array(); // lista id-uri oferte
- foreach ($offers as $offer) {
- $offers_ids[] = $offer['offer_id'];
- if ($offer['restriction_type_id']==4) {
- $offerMembers[] = $offer['offer_id'];
- }
- }
- // returneze array asociativ
- $offerComments = $tbOfferComment->getOffersComments($offerIds);
- $offerBrands = $brandOfferTable->getBrandsByOfferIds($offerIds);
- ?>
Add Comment
Please, Sign In to add comment