|
@@ -216,12 +216,13 @@ class Table_day_k extends Table {
|
|
|
$sql = "select * from ". $this->table_fullname ." where 1=1 ";
|
|
$sql = "select * from ". $this->table_fullname ." where 1=1 ";
|
|
|
$where =" and day_k_code=".$stock_code ;
|
|
$where =" and day_k_code=".$stock_code ;
|
|
|
if($date==0){//获取的是当天的数据
|
|
if($date==0){//获取的是当天的数据
|
|
|
- $date = date("Ymd",time());
|
|
|
|
|
- $where.=" and day_k_date = ".$date;
|
|
|
|
|
|
|
+
|
|
|
|
|
+ $date = (int)(strtotime(date("Y-m-d",time())));
|
|
|
|
|
+ $where.=" and day_k_timestamp = ".$date;
|
|
|
|
|
|
|
|
}else{//获取某一天的数据
|
|
}else{//获取某一天的数据
|
|
|
$date = $this->pdo->sql_check_input(array('number', $date));
|
|
$date = $this->pdo->sql_check_input(array('number', $date));
|
|
|
- $where.=" and day_k_date =".$date;
|
|
|
|
|
|
|
+ $where.=" and day_k_timestamp =".$date;
|
|
|
}
|
|
}
|
|
|
$sql.=$where;
|
|
$sql.=$where;
|
|
|
|
|
|
|
@@ -232,7 +233,7 @@ class Table_day_k extends Table {
|
|
|
|
|
|
|
|
$r[$key] = $this->dataToAttr($val);
|
|
$r[$key] = $this->dataToAttr($val);
|
|
|
}
|
|
}
|
|
|
- return $r;
|
|
|
|
|
|
|
+ return $r[0];
|
|
|
}else{
|
|
}else{
|
|
|
return $r;
|
|
return $r;
|
|
|
}
|
|
}
|