table_index_sh.class.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /**
  3. * 数据库表:管理员组
  4. *
  5. * @createtime 2018/03/01
  6. * @author 空竹
  7. * @copyright 芝麻开发(http://www.zhimawork.com)
  8. */
  9. class Table_index_sh extends Table {
  10. protected $table_name = 'index_sh';//表名,不带前缀,前缀在config中定义
  11. //数据库结构
  12. protected function struct(){
  13. $attr = array();
  14. $attr['id'] = 'index_sh_id';
  15. $attr['date'] = 'index_sh_date';
  16. $attr['open_price'] = 'index_sh_open_price';
  17. $attr['close_price'] = 'index_sh_close_price';
  18. $attr['increase_price'] = 'index_sh_increase_price';
  19. $attr['increase_value'] = 'index_sh_increase_value';
  20. $attr['amount'] = 'index_sh_amount';
  21. $attr['value'] = 'index_sh_value';
  22. return $attr;
  23. }
  24. public function add($attr){
  25. $param = array (
  26. 'admingroup_name' => array('string', $attr['name'])
  27. );
  28. return $this->pdo->sqlinsert($this->table_fullname, $param);
  29. }
  30. //获取列表(分页)
  31. //$count、$page和$pagesize都为0时,返回全部结果(适用于无需分页的情况)
  32. //
  33. //@param $filter array -- 过滤条件,格式见Table::filterToWhere
  34. //@param $count -- 0:返回列表 1:返回结果数量
  35. //@param $page -- 当前第几页
  36. //@param $pagesize -- 每页数量
  37. public function getList($filter = array(), $count = 0, $page = 0, $pagesize = 0)
  38. {
  39. }
  40. }
  41. ?>