| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
- /**
- * 数据库表:管理员组
- *
- * @createtime 2018/03/01
- * @author 空竹
- * @copyright 芝麻开发(http://www.zhimawork.com)
- */
- class Table_index_kc50 extends Table {
- protected $table_name = 'index_kc50';//表名,不带前缀,前缀在config中定义
- protected $table_id = 'index_kc50_id';//指定ID字段名称,必须
- protected $table_status = '';//指定状态字段名称,如果有
- protected $table_order = '';//指定排序字段名称,如果有
- //数据库结构
- protected function struct(){
- $attr = array();
-
- $attr['id'] = 'index_kc50_id';
- $attr['date'] = 'index_kc50_date';
- $attr['open_price'] = 'index_kc50_open_price';
- $attr['close_price'] = 'index_kc50_close_price';
- $attr['increase_price'] = 'index_kc50_increase_price';
- $attr['increase_value'] = 'index_kc50_increase_value';
- $attr['amount'] = 'index_kc50_amount';
- $attr['value'] = 'index_kc50_value';
- return $attr;
- }
- public function add($attr){
- $param = array (
- 'index_kc50_date' => array('number', $attr['date']),
- 'index_kc50_open_price' => array('number', $attr['open_price']),
- 'index_kc50_close_price' => array('number', $attr['close_price']),
- 'index_kc50_hightest_price' => array('number', $attr['hightest_price']),
- 'index_kc50_lowest_price' => array('number', $attr['lowest_price']),
- 'index_kc50_increase_value' => array('number', $attr['increase_value']),
- 'index_kc50_increase_price' => array('number', $attr['increase_price']),
- 'index_kc50_amount' => array('number', $attr['amount']),
- 'index_kc50_value' => array('number', $attr['value']),
- );
- return $this->pdo->sqlinsert($this->table_fullname, $param);
- }
- //获取列表(分页)
- //$count、$page和$pagesize都为0时,返回全部结果(适用于无需分页的情况)
- //
- //@param $filter array -- 过滤条件,格式见Table::filterToWhere
- //@param $count -- 0:返回列表 1:返回结果数量
- //@param $page -- 当前第几页
- //@param $pagesize -- 每页数量
- public function getList($filter = array(), $count = 0, $page = 0, $pagesize = 0)
- {
- }
- }
- ?>
|