1, $data存放实体: 

$data['title'] = I('post.title'); // 标题

$data['content'] = I('post.content'); // 正文
$data['postdate'] = I('post.postdate'); // 当前日期时间

 

2, $result = $article->data($data)->save();  返回 0或者1 

o===false

1===true

 

3,HTML中 路径

href= "{:U('edit')}?tid={:I('get.tid')}"

 

4  UNION 使用

$res=$model->field('id,uid,realname,DEPTID as depid')
->where($data)->table('gusers')
->union('SELECT id,uid,realname,deptid FROM lusers where deptid ='.$parentid)
->select();

相关文章:

  • 2022-12-23
  • 2021-09-15
  • 2022-12-23
  • 2021-04-09
  • 2021-12-05
  • 2021-11-07
  • 2022-02-27
  • 2022-02-12
猜你喜欢
  • 2021-08-27
  • 2021-11-05
  • 2022-12-23
  • 2021-10-09
  • 2021-08-06
  • 2021-04-27
  • 2021-05-01
相关资源
相似解决方案