예제 #1
0
 public static function loadTagForObject(DatabaseObject $product, $seller_type)
 {
     $select = $product->getDb()->select();
     if ($seller_type == 'storeSeller') {
         $select->from('products_tags', '*')->where('product_id = ?', $product->getId());
     } elseif ($seller_type == 'generalSeller') {
         $select->from('user_products_tag', '*')->where('product_id = ?', $product->getId());
     }
     return $product->getDb()->fetchAll($select);
 }
예제 #2
0
 public function setDatabaseObject(DatabaseObject $object)
 {
     $this->_dbObject = $object;
     $this->_db = $object->getDb();
     $this->_table = $object->getTable();
     return $this;
 }