table_index_csi300.class.php 1.7 KB

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