destoon 笔记

cmseasy

http://help.destoon.com/book/

★新建模块
1.destoon_module插入数据
2.新建/test/ [中转文件夹](模仿down)
2.新建/module/test/ [业务层文件夹](模仿down)
3.修改/module/test/admin/config.inc.php 中 $MCFG['name'] $MCFG['moduleid']
4.新建/template/default/test/ [模板文件夹]
5.新建destoon_test表

★模块设置
/file/cache/module-23.php
/module/test/admin/template/setting.tpl.php
$MOD['upload']

★模板
include template('index', 'member');


SELECT * FROM destoon_sell WHERE status=3 ORDER BY addtime DESC LIMIT 0,10
<!--{tag("moduleid=5&condition=status=3&order=addtime desc&pagesize=10")}-->
不用模板
<!--{php $tags=tag("moduleid=...&template=null");}-->
{loop $tags $k}
...{date('Y-m-d', $k[addtime])} {dsubstr($v[introduce], 80, '...')}
{/loop>
联合查询
{tag("table=destoon_member m,destoon_company c&prefix=&condition=m.userid=c.userid and m.username='destoon'&template=list-com")}


★数据库
执行
$db->query("INSERT INTO `{$DT_PRE}table` (`xxx`) VALUES ('yyy')");
$db->query("UPDATE `{$DT_PRE}table` SET `xxx`='yyy' WHERE `zzz`=1");
$db->query("DELETE FROM `{$DT_PRE}table` WHERE `zzz`=1");
$db->insert_id()
多条信息
$A = array();
$result = $db->query("SELECT * FROM `{$DT_PRE}table` WHERE `xxx`='yyy' ORDER BY `zzz` DESC LIMIT 0,10");
while($r = $db->fetch_array($result)) {
$A[] = $r;
}
print_r($A);
单条信息
$A = $db->get_one("SELECT * FROM `{$DT_PRE}table` WHERE `xxx`='yyy'");
print_r($A);
计算总数
$A = $db->get_one("SELECT COUNT(*) AS num FROM `{$DT_PRE}table` WHERE `xxx`='yyy'");
echo $A['num'];

★消息
global.func.php
send_message/send_mail

转载于:https://www.cnblogs.com/foxtk/archive/2013/03/13/2956982.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值