/** * 取得标准产品型号 */ public function getprojectstandardAction() { $request = $this->getRequest()->getParams(); $where = "1=1"; if (isset($request['q']) && $request['q']) { $q = $request['q']; $where = "t1.model_standard like '%{$q}%'"; } $catalog = new Product_Model_Catalog(); $data = $catalog->getAdapter()->query("select t1.id, concat(t1.model_standard,'[', t2.name, ']') as name from oa_product_catalog t1 inner join oa_product_catalog_series t2 on t1.series_id = t2.id where {$where} and t1.active = 1 and t2.active=1 and t1.model_standard != '' order by t1.model_standard")->fetchAll(); echo Zend_Json::encode($data); exit; }