update: minor update
This commit is contained in:
@@ -17,7 +17,7 @@ if($day_end) {
|
||||
$where .= " and trade_date <'".$day_end."'";
|
||||
}
|
||||
$sql= <<<EOF
|
||||
select trade_date, $item as pe_ttm from stock_his_basic_pro where ts_code = '$ts_code' $where order by trade_date asc
|
||||
select DATE_FORMAT(trade_date,'%Y-%m-%d') as trade_date, $item as pe_ttm from stock_his_basic_pro where ts_code = '$ts_code' $where order by trade_date asc
|
||||
EOF;
|
||||
#echo $sql;
|
||||
$result = $mysqli->query($sql);
|
||||
@@ -27,7 +27,8 @@ $tDate=$idx=$data=$data_clean=array(); # $data_clean is an array without null
|
||||
if($result && $result->num_rows>0) {
|
||||
#$data = $result->fetch_all();
|
||||
while($row=$result->fetch_assoc()){
|
||||
$trade_date=substr($row['trade_date'],0,4).'-'.substr($row['trade_date'],4,2).'-'.substr($row['trade_date'],6,2);
|
||||
$trade_date=$row['trade_date'];
|
||||
#$trade_date=substr($row['trade_date'],0,4).'-'.substr($row['trade_date'],4,2).'-'.substr($row['trade_date'],6,2);
|
||||
#$trade_date1=strtotime($row['trade_date']);
|
||||
array_push($tDate,$trade_date);
|
||||
array_push($idx,$row['pe_ttm']);
|
||||
|
||||
Reference in New Issue
Block a user