Reply.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. namespace app\admin\model;
  3. use think\Model;
  4. /**
  5. * 欢迎语模型
  6. */
  7. class Reply extends Model
  8. {
  9. /**
  10. * find数据筛选
  11. *
  12. * @access public
  13. * @param mixed $where 数据
  14. * @return array 返回类型
  15. */
  16. public function findReply($where)
  17. {
  18. $result = $this->where($where)->find();
  19. return $result;
  20. }//end findReply()
  21. /**
  22. * select数据筛选
  23. *
  24. * @access public
  25. * @param mixed $where 数据
  26. * @return array 返回类型
  27. */
  28. public function selectReply($where)
  29. {
  30. $result = $this->where($where)->order('sort', 'asc')->select();
  31. return $result;
  32. }//end selectReply()
  33. /**
  34. * 数据修改
  35. *
  36. * @access public
  37. * @param mixed $data 数据
  38. * @param mixed $where 条件
  39. * @return array 返回类型
  40. */
  41. public function updateReply($where, $data)
  42. {
  43. $result = $this->where($where)->update($data);
  44. return $result;
  45. }//end updateReply()
  46. }