本文整理汇总了PHP中Brand::brandForAdd方法的典型用法代码示例。如果您正苦于以下问题:PHP Brand::brandForAdd方法的具体用法?PHP Brand::brandForAdd怎么用?PHP Brand::brandForAdd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Brand
的用法示例。
在下文中一共展示了Brand::brandForAdd方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: branddateget
public static function branddateget()
{
$rowsPer = 500;
$data = Yii::app()->beudb->createCommand()->select('*')->from('b_brand')->queryAll();
if (count($data) > 0) {
$data = Comm::Conversion($data, "GBK", "UTF-8");
foreach ($data as $value) {
$arr = array();
$arr['id'] = $value['id'];
$arr['name'] = $value['name'];
if (empty($value['englishname'])) {
$arr['englishname'] = $value['name'];
} else {
$arr['englishname'] = $value['englishname'];
}
$arr['logoimgpath'] = $value['logoimgpath'];
$arr['telephone'] = $value['telephone'];
$arr['address'] = $value['address'];
// echo $value['clothescategory'];exit();
$arr['fax'] = $value['fax'];
$arr['website'] = $value['website'];
$arr['companyname'] = $value['companyname'];
if ($value['status'] == 1) {
$arr['status'] = 10;
} else {
$arr['status'] = 11;
}
$arr['createdate'] = $value['date_added'];
try {
Brand::brandSelectById($value['id']);
} catch (Exception $e) {
Brand::brandForAdd($arr);
}
}
} else {
echo "null";
}
}