gaofeigz 发表于 2015-8-9 22:49:31

destoon5.0求购模块增加统计报价数量的方法

本帖最后由 gaofeigz 于 2015-8-9 22:50 编辑

第一步

到buy_6表中增加一个字段 pricenums,字段类型为int 长度限制10,默认0

如果不会去MYSQL中操作的,直接在后台模块设置自定义字段,增加一个字段pricenums,设置为整数类型,默认0,直接显示,前台显示都设置为否。

第二步
打开module/buy/price.inc.php,


搜索
if(send_message($item['username'], $title, $message, 2, $_username)) {
在他下面加入以下语句

$db->get_one("updat {$DT_PRE}buy_6 SET price_nums=pricenums+1 wher itemid=$itemid");

第三步:调用

然后在模块设置列表或搜索主字段中添加 pricenums,列表中使用 {$t}调用

内容页使用{$picenums} 调用!

如果不懂,请加群:61291160

joy 发表于 2015-8-10 09:04:58


感谢楼主分享

gaofeigz 发表于 2015-8-10 11:31:53


$db->get_one("updat {$DT_PRE}buy_6 SET pricenums=pricenums+1 wher itemid=$itemid");

贴子里,字段写错了,这个是正确的

zhao90 发表于 2015-8-10 16:37:18


支持分享

summer 发表于 2015-12-16 17:43:58


gaofeigz 发表于 2015-8-10 11:31

$db->get_one("updat {$DT_PRE}buy_6 SET pricenums=pricenums+1 wher itemid=$itemid");

贴子里,字段写 ...
这语句还是不对啊
http://bbs.destoon.com/static/image/smiley/default/sweat.gif

gaofeigz 发表于 2015-8-10 11:31:00


summer 发表于 2015-12-16 17:43

这语句还是不对啊
updat单词后面的e被过虑掉了
页: [1]
查看完整版本: destoon5.0求购模块增加统计报价数量的方法