|
|
@@ -55,48 +55,6 @@ class Table_index_day_k extends Table {
|
|
|
//-------------------------------
|
|
|
|
|
|
|
|
|
- /****
|
|
|
- * @param $start_date
|
|
|
- * @param $end_date
|
|
|
- * @param $index_type
|
|
|
- * @param $num
|
|
|
- * @param $order_info
|
|
|
- * @return array
|
|
|
- * wanggangtao
|
|
|
- */
|
|
|
- public function getIndexListHistroy($code,$start_date,$end_date,$order_info)
|
|
|
- {
|
|
|
- //查询语句必须用sql_check_input检查参数
|
|
|
- $stock_code= $this->pdo->sql_check_input(array('string', $code));
|
|
|
- $start_date= $this->pdo->sql_check_input(array('number', $start_date));
|
|
|
- $end_date = $this->pdo->sql_check_input(array('number', $end_date));
|
|
|
- $sql = "select * from ". $this->table_fullname ." where 1=1 ";
|
|
|
- $sql.=" and index_day_k_code=".$stock_code ;
|
|
|
-
|
|
|
-
|
|
|
- $where =" and index_day_k_date >= ".$start_date." and index_day_k_date<=".$end_date ;
|
|
|
- $sql.=$where;
|
|
|
-
|
|
|
- if($order_info==1){
|
|
|
- $order=" order by index_day_k_date desc ";
|
|
|
- }else{
|
|
|
- $order=" order by index_day_k_date asc ";
|
|
|
- }
|
|
|
- $sql.=$order;
|
|
|
-
|
|
|
- $rs = $this->pdo->sqlQuery($sql);
|
|
|
- $r = array();
|
|
|
- if($rs){
|
|
|
- foreach($rs as $key => $val){
|
|
|
-
|
|
|
- $r[$key] = $this->dataToAttr($val);
|
|
|
- }
|
|
|
- return $r;
|
|
|
- }else{
|
|
|
- return $r;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
|
|
|
|