function getProductSpec($productGenSpecId) { $productSpec = new productspec(); $productSpec->where('product_id', $this->id); $productSpec->where('productgenspec_id', $productGenSpecId); $productSpec->get(); if (!$productSpec->exists()) { return false; } else { return $productSpec; } }
</div> <?php $h = 0; foreach ($this->compareProduct as $r) { $h++; ?> <?php if ($h > 1) { ?> <div class="p_r_txt" style="width: 250px;padding-left:10px;padding-right:10px;" > <?php $pSpec = new productspec(); $pSpec->where('productgenspec_id', $spec->productgenspec_id); $pSpec->where('product_id', $r->id); $pSpec->get(); if ($pSpec->exists()) { echo $pSpec->value; } $pSpec->clear(); ?> </div> <?php } ?> <?php } ?> <div class="clr"></div> </div>