tp3.2web项目开发过程出现的问题

查找最小值的方法,由于min()函数与where会优先调用min()函数,where失效

$mins=$user->where('status>0')->order('id asc')->limit(0,1)->find();

 获取当前时间前n天的方法,strtotime()中引入变量,路径中引入变量

$day=date("Y-m-d",strtotime("-".$d." day"));
url:'./showmore/id/'+data.id+'',

tp和layui的分页操作  

前端page:true,limit:赋值, 后台ajaxReturn(),count值设定

public function history2($page,$limit)
$start=($page-1)*$limit;
$info1=$att->join('join sz_user on sz_user.num=sz_attendance.num')->field('date,sz_attendance.num,name,stat,status,group')->limit($start,$limit)->select();

 php中往一个数组中添加一个不存在的下标不需声明或其他操作 

另外,localhost一直在响应可能是由于进入死循环 

for($count=0;$count<$count1;$count++)
        {
            $info1[$count]['operator']=$info2[$count]['name'];
        }

 layui中分页后刷新当前页(非当前页面)的方法

$(".layui-laypage-btn")[0].click(); 

修改操作中对id值的查找只能用assign?

 <li type="text" id="no" >
                <i class="layui-icon layui-icon-note"></i>培训编号:
</li>

$('#no').append(data.no);

上面两个配合使用

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值