方维分享系统采集淘宝天猫详情,写入数据库;
share -- share_goods -- goods
// add by wangtongphp QQ:1006440989 http://wwwbuild.net/
ALTER TABLE `fanwe_goods` ADD `desc` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL
测试脚本:
// add by wangtongphp QQ:1006440989 http://wwwbuild.net/
select num_iid ,`desc` from fanwe_taobao_share
select id,content,`desc` from `fanwe_goods` order by id desc limit 3;
share.services.php , 470行附近;在插入表 goods之前 ;
//add by wangtongphp QQ:1006440989 采集商品详情写入数据 $goods_data['desc'] = $goods['desc'];
note.module.php 190 附近,获取到数据库的详情
//add by wangtongphp 获取商品的详情 来自http://www.cnblogs.com/wangtongphp/archive/2013/05/25/3098499.html if ($current_obj['goods_id']) { $wt_res = FDB::fetchFirst('SELECT * FROM '.FDB::table('goods').' WHERE id = '.$current_obj['goods_id']); $current_obj['desc'] = $wt_res['desc']; }