|
|
@@ -64,8 +64,40 @@ class Table_index extends Table {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public function get_index_info($index_type){
|
|
|
|
|
|
-
|
|
|
+ $where=" where 1=1 ";
|
|
|
+ $sql = "select "."`*`". "from ". $this->table_fullname . $where ;
|
|
|
+ if($index_type==1){
|
|
|
+ $stock_code="000001";
|
|
|
+ $sql.=" and index_code=".$stock_code ;
|
|
|
+ }else if($index_type==2){
|
|
|
+ $stock_code="399001";
|
|
|
+ $sql.=" and index_code=".$stock_code ;
|
|
|
+ }else if($index_type==3){
|
|
|
+ $stock_code="000016";
|
|
|
+ $sql.=" and index_code=".$stock_code ;
|
|
|
+ }else if($index_type==4){
|
|
|
+ $stock_code="399300";
|
|
|
+ $sql.=" and index_code=".$stock_code ;
|
|
|
+ }else if($index_type==5){
|
|
|
+ $stock_code="399006";
|
|
|
+ $sql.=" and index_code=".$stock_code ;
|
|
|
+ }else if($index_type==6){
|
|
|
+ $stock_code="000688";
|
|
|
+ $sql.=" and index_code=".$stock_code ;
|
|
|
+ }
|
|
|
+ $rs = $this->pdo->sqlQuery($sql);
|
|
|
+ $r = array();
|
|
|
+ if($rs){
|
|
|
+ foreach($rs as $key => $val){
|
|
|
+ $r[$key] = $this->dataToAttr($val);
|
|
|
+ }
|
|
|
+ return $r;
|
|
|
+ }else{
|
|
|
+ return $r;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|