zoukankan      html  css  js  c++  java
  • shopnc导入商品到大商创

    <?php
    //select member_name user_name,member_mobile mobile_phone,member_email email,member_passwd old_psd from shopjl_member
    //为商户添加品牌
    
    header("Content-Type: text/html; charset=UTF-8");
    $con = mysql_connect("localhost","root","root");
    mysql_query("SET NAMES 'utf8'");
    mysql_select_db("XXX", $con);
    
    $result = mysql_query(" select a.goods_name,a.goods_price,a.store_id,a.goods_body,a.member_id,a.goods_image,a.gc_name,dsc_merchants_shop_information.user_id
    from (
        select shopjl_goods.goods_name,shopjl_goods.goods_price,shopjl_goods.store_id,shopjl_goods_common.goods_body,shopjl_store.member_id,shopjl_goods.goods_image,shopjl_goods_common.gc_name
        from shopjl_goods 
        left join shopjl_goods_common on shopjl_goods.goods_commonid = shopjl_goods_common.goods_commonid 
        left join shopjl_store on shopjl_goods.store_id = shopjl_store.store_id   
    ) a left join dsc_merchants_shop_information on a.store_id = dsc_merchants_shop_information.fleam_sid ");
    
    while($row = mysql_fetch_array($result))
      {
        $row['goods_img_url'] ='http://www.gnb360.com/data/upload/shop/store/goods/'.$row['store_id'].'/'.$row['goods_image'].'';
        $data[] = $row;
      }
      
      /*  echo "<pre>";
        print_r ($data); */
        
        foreach ($data as $key=>$value){
            mysql_query(" INSERT INTO `gannongbaoss`.`dsc_goods` (goods_name, goods_name_style, goods_sn, bar_code, cat_id, user_cat, brand_id, shop_price, market_price, is_promote, promote_price, promote_start_date, promote_end_date, goods_img, goods_thumb, original_img, keywords, goods_brief, seller_note, goods_weight, goods_number, warn_number, integral, give_integral, is_best, is_new, is_hot, is_on_sale, is_alone_sale, is_shipping, goods_desc, add_time, last_update, goods_type, rank_integral, suppliers_id , goods_shipai, user_id, model_price, model_inventory, model_attr, review_status, group_number, store_new, store_hot, store_best, goods_product_tag, is_xiangou, xiangou_num, xiangou_start_date, xiangou_end_date, largest_amount, pinyin_keyword,stages,stages_rate,g_class)VALUES ('".$value['goods_name']."', '+', '', '', '1489', '0', '2330', '".$value['goods_price']."', '".$value['goods_price']."', '0','0', '0', '0', '".$value['goods_img_url']."', '".$value['goods_img_url']."', '', '', '', '', '0', '1000', '1', '0', '0', '0', '0', '0', '1', '1', 0, '
    
    ".$value['goods_body']."
    
    ', '1480609138', '1480609138', '0', '0', '0' , '', '".$value['user_id']."', '0', '0', '0', '1', '0', '0', '0', '0', '', '0', '0', '0', '0', '0', 'shangpinmingcheng','','','".$value['gc_name']."') ");
        }
    ?>

     UPDATE `gan`.`dsc_goods` SET review_status = '3' 商品审核通过

  • 相关阅读:
    Java学习笔记_180706_接口实现、类继承、多态、转型
    poj 1279 求半平面交的 面积(推荐)
    半平面交 模板 poj 3335 poj 3130 poj 1474 判断半平面交是否为空集
    高斯消元 zoj 3645 poj 1222/XOR消元
    向量旋转专题
    hdu 1524 A Chess Game SG函数(有向无环图-拓扑图)博弈 (二维) + dfs(模板)
    HDOJ1079&POJ1082&ZOJ1024 Calendar Game [找规律博弈]
    转 博弈类题目小结(hdu,poj,zoj)
    poj 3080 get_next + kmp + 字符数组做函数参数 + 数组下标从1 开始
    poj Area 1265 求面积+ 多边形边上的点的个数+ 多边形内点个数
  • 原文地址:https://www.cnblogs.com/hellowzd/p/6125425.html
Copyright © 2011-2022 走看看