|
|
@@ -9,8 +9,10 @@
|
|
|
|
|
|
class Table_index_day_k extends Table {
|
|
|
|
|
|
- protected $table_name = "index_day_k";//表名,不带前缀,前缀在config中定义
|
|
|
- protected $table_id = "index_day_k_id";//指定ID字段名称,必须
|
|
|
+ protected $table_name = 'index_day_k';//表名,不带前缀,前缀在config中定义
|
|
|
+ protected $table_id = 'index_day_k_id';//指定ID字段名称,必须
|
|
|
+ protected $table_status = '';//指定状态字段名称,如果有
|
|
|
+ protected $table_order = '';//指定排序字段名称,如果有
|
|
|
|
|
|
//数据库结构
|
|
|
protected function struct(){
|
|
|
@@ -22,17 +24,35 @@ class Table_index_day_k extends Table {
|
|
|
$attr['name'] = 'index_day_k_name';
|
|
|
$attr['open_price'] = 'index_day_k_open_price';
|
|
|
$attr['close_price'] = 'index_day_k_close_price';
|
|
|
- $attr['highest_price'] = 'index_day_k_highest_price';
|
|
|
+ $attr['highest_price'] = 'index_day_k_highest_price';
|
|
|
$attr['lowest_price'] = 'index_day_k_lowest_price';
|
|
|
$attr['increase_price'] = 'index_day_k_increase_price';
|
|
|
$attr['increase_ratio'] = 'index_day_k_increase_ratio';
|
|
|
$attr['amount'] = 'index_day_k_amount';
|
|
|
$attr['value'] = 'index_day_k_value';
|
|
|
-
|
|
|
return $attr;
|
|
|
}
|
|
|
|
|
|
+ public function add($attr){
|
|
|
+ $param = array (
|
|
|
+ 'index_day_k_timestamp' => array('number', $attr['timestamp']),
|
|
|
+ 'index_day_k_date' => array('number', $attr['date']),
|
|
|
+ 'index_day_k_code' => array('string', $attr['code']),
|
|
|
+ 'index_day_k_name' => array('string', $attr['name']),
|
|
|
+ 'index_day_k_open_price' => array('number', $attr['open_price']),
|
|
|
+ 'index_day_k_close_price' => array('number', $attr['close_price']),
|
|
|
+ 'index_day_k_highest_price' => array('number', $attr['highest_price']),
|
|
|
+ 'index_day_k_lowest_price' => array('number', $attr['lowest_price']),
|
|
|
+ 'index_day_k_increase_price' => array('number', $attr['increase_price']),
|
|
|
+ 'index_day_k_increase_ratio' => array('number', $attr['increase_ratio']),
|
|
|
+ 'index_day_k_amount' => array('number', $attr['amount']),
|
|
|
+ 'index_day_k_value' => array('number', $attr['value']),
|
|
|
+ );
|
|
|
+ return $this->pdo->sqlinsert($this->table_fullname, $param);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
+ //-------------------------------
|
|
|
|
|
|
public function index_recent_days($code,$start_date,$traceback_days,$order)
|
|
|
{
|
|
|
@@ -148,23 +168,7 @@ class Table_index_day_k extends Table {
|
|
|
}
|
|
|
|
|
|
|
|
|
- public function add($attr){
|
|
|
- $param = array (
|
|
|
|
|
|
- 'index_day_k_timestamp' => array('number', $attr['timestamp']),
|
|
|
- 'index_day_k_date' => array('number', $attr['date']),
|
|
|
- 'index_day_k_code' => array('string', $attr['code']),
|
|
|
- 'index_day_k_name' => array('string', $attr['name']),
|
|
|
- 'index_day_k_open_price' => array('number', $attr['open_price']),
|
|
|
- 'index_day_k_close_price' => array('number', $attr['close_price']),
|
|
|
- 'index_day_k_highest_price' => array('number', $attr['highest_price']),
|
|
|
- 'index_day_k_lowest_price' => array('number', $attr['lowest_price']),
|
|
|
- 'index_day_k_increase_price' => array('number', $attr['increase_price']),
|
|
|
- 'index_day_k_increase_ratio' => array('number', $attr['increase_ratio']),
|
|
|
- 'index_day_k_amount' => array('number', $attr['amount']),
|
|
|
- 'index_day_k_value' => array('number', $attr['value']), );
|
|
|
- return $this->pdo->sqlinsert($this->table_fullname, $param);
|
|
|
- }
|
|
|
|
|
|
|
|
|
/***
|