寫準確查詢:
$select1 = new Select();
$select1->from('catalog_product_option')
->columns('option_id')
->where(array('product_id' => 11));
$where2 = new Where();
$select2 = new Select();
$select2->from('catalog_product_option_type_value')
->columns('option_type_id')
->where($where2->in('option_id', $select1);
$where = new Where();
$select = new Select();
$select->from('catalog_product_option_type_price')
->columns('price')
->where($where->in('option_type_id', $select2);
但爲什麼不嘗試
$select = new Select();
$select->from(array('p' => 'catalog_product_option_type_price'))
->join(array('v' => 'catalog_product_option_type_value'), 'p.option_type_id = v.option_type_id', array())
->join(array('o' => 'catalog_product_option'), 'v.option_id = o.option_id', array())
->columns('price')
->where(array('o.product_id' => 11));
這應該給予同樣的結果。