标签:
1 $wid=$this->_post(‘order_id‘); 2 if(!$wid){ 3 echo(‘工单信息获取失败!‘); 4 exit; 5 } 6 $where=null; 7 $where[‘A.wid‘]=$wid; 8 $list=M(‘kefu_reply‘)->alias("A")->join(‘z_user_common as B on A.uid=B.id‘)-> 9 where($where)->field(‘A.*,B.realname,B.account‘)->order(‘A.do_time desc‘)->select(); 10 foreach ($list as $key => $value) { 11 if(mb_strlen($value[‘content‘])>15){ 12 $list[$key][‘content_new‘]=mb_substr($value[‘content‘],0,6,‘utf-8‘); 13 }else{ 14 $list[$key][‘content_new‘]=$value[‘content‘]; 15 } 16 $list[$key][‘dotime‘]=date("Y-m-d H:i:s", $value[‘do_time‘]); 17 } 18 //dotime是追加的键值
标签:
原文地址:http://www.cnblogs.com/719907411hl/p/4892253.html