本文整理匯總了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";
}
}