Exemplo n.º 1
0
 function getWheelSideProductIds(VF_Wheel_BoltPattern_Single $bolt)
 {
     $select = $this->getReadAdapter()->select()->from('elite_product_wheeladapter', 'distinct(entity_id) entity_id')->where('lug_count = ?', $bolt->getLugCount())->where('bolt_distance = ?', $bolt->getDistance());
     $result = $select->query();
     $return = array();
     while ($row = $result->fetch()) {
         array_push($return, $row['entity_id']);
     }
     return $return;
 }
Exemplo n.º 2
0
 function addBoltPattern(VF_Wheel_BoltPattern_Single $boltPattern)
 {
     $this->query(sprintf("REPLACE INTO `elite_definition_wheel` ( `leaf_id`, `lug_count`, `bolt_distance`, `offset` ) VALUES ( %d, %d, %s, %s )", $this->getId(), (int) $boltPattern->getLugCount(), (double) $boltPattern->getDistance(), (double) $boltPattern->getOffset()));
 }