Decommentato importOldData per importare tutto

This commit is contained in:
Riccardo Di Dato
2016-03-18 10:16:26 +01:00
parent edadaec574
commit a8f3379a57
2 changed files with 10 additions and 4 deletions
+9 -3
View File
@@ -31,10 +31,13 @@ else {
GlobalVariables::get("dao")->save($admin);
}
$count = 0;
$imgDir = "/home/r.didato/mediaimg/notizie";
$statement = $pdo->query("select * from notizia order by id desc limit 0,100");
$statement = $pdo->query("select * from notizia order by id desc limit $count,100");
$dati = $statement->fetchALL(PDO::FETCH_CLASS,"stdClass");
// while (is_array($dati) && sizeof($dati)==0){
while (is_array($dati) && sizeof($dati)>0){
foreach ($dati as $ele){
$notizia = new stdClass();
$notizia->status = NotiziaModel::STATUS_ACCEPTED;
@@ -129,7 +132,10 @@ $dati = $statement->fetchALL(PDO::FETCH_CLASS,"stdClass");
// }
// }
$count+=100;
$statement = $pdo->query("select * from notizia order by id desc limit $count,100");
$dati = $statement->fetchALL(PDO::FETCH_CLASS,"stdClass");
}
// }
}
?>
+1 -1
View File
@@ -120,7 +120,7 @@ div.commentoAcceptance > .buttons a.red:hover{background-color:#FF8DA6;}
div.commentoAcceptance > .buttons a.yellow:hover{background-color:#FF8DA6;}
div.commentoBlock{border: 4px solid #CFCFCF;border-radius: 15px;padding: 12px 5px 5px 20px;margin: 5px 0px;background-color: #E6E6E6;}
.commentiBlock ul {list-style: none;}
/*
____ _ _ _ _ _ _____ ____
| __ ) / \ | \ | | \ | | ____| _ \