tode
This commit is contained in:
parent
96a39ab068
commit
f2ab6d16a2
@ -2,7 +2,8 @@
|
|||||||
<?php
|
<?php
|
||||||
include "config.php";
|
include "config.php";
|
||||||
|
|
||||||
$sql = "SELECT * FROM scans WHERE site=2";
|
$sql = "SELECT * FROM `scans` WHERE id=(SELECT Max(id) FROM `scans` WHERE site=2 ) ";
|
||||||
|
//$sql = "SELECT * FROM scans WHERE site=2";
|
||||||
$stmt = $pdo->query($sql);
|
$stmt = $pdo->query($sql);
|
||||||
$data = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
$data = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||||
foreach ($data as $scan){
|
foreach ($data as $scan){
|
||||||
@ -21,7 +22,10 @@ foreach ($data as $scan){
|
|||||||
$country = array();
|
$country = array();
|
||||||
$p2 = $parts[$i]->childNodes;
|
$p2 = $parts[$i]->childNodes;
|
||||||
$country[] = $p2[0]->textContent;
|
$country[] = $p2[0]->textContent;
|
||||||
$deaths = (strpos($p2[6]->textContent, "+") !== false?0:$p2[6]->textContent);
|
for ($j=0; $j < $p2->length; $j++){
|
||||||
|
var_dump($p2[$j]->textContent);
|
||||||
|
}
|
||||||
|
$deaths = (strpos($p2[6]->textContent, "+") !== false?$p2[8]->textContent:$p2[6]->textContent);
|
||||||
$country[] = intval(str_replace(",", "", $p2[2]->textContent));
|
$country[] = intval(str_replace(",", "", $p2[2]->textContent));
|
||||||
$country[] =intval(str_replace(",", "", $deaths));
|
$country[] =intval(str_replace(",", "", $deaths));
|
||||||
$country[] =intval(str_replace(",", "", $p2[10]->textContent));
|
$country[] =intval(str_replace(",", "", $p2[10]->textContent));
|
||||||
|
Loading…
Reference in New Issue
Block a user