企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持知识库和私有化部署方案 广告
### 通过规格属性的名称得到规格属性信息 **位置:** Common\Lib\GoodsBaseLib.class.php **参数:** * @param $attr_name string 规格属性名称 * @return $attr_info array 规格属性的信息 **调用:** * $goodsbase = new GoodsBaseLib(); * $attr_info = $goodsbase->getAttrArr($attr_id); **完整代码:** ~~~ /** * 通过规格属性的名称得到规格属性信息 * whz 2018-05-15 * @param $attr_name string 规格属性名称 * @return $attr_info array 规格属性的信息 */ public function getAttrInfo($attr_name) { $attr_info = M('goods_attribute') ->where("attr_name = '{$attr_name}' AND is_delete = '0'") ->find(); return $attr_info; } ~~~