mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
Fix errors
This commit is contained in:
parent
94eac4e554
commit
3bbe911b98
2 changed files with 2 additions and 2 deletions
|
@ -14,7 +14,7 @@ foreach ($videos as $value) {
|
|||
$newTotal = VideoStatistic::getSecondsWatchedFromVideos_id($value['id']);
|
||||
if($newTotal>$value['total_seconds_watching']){
|
||||
$sql = "UPDATE videos SET total_seconds_watching = ?, modified = now() WHERE id = ?";
|
||||
sqlDAL::writeSql($sql, "ii", [$newTotal, $value['id']]);
|
||||
sqlDAL::writeSql($sql, "ii", [intval($newTotal), intval($value['id'])]);
|
||||
echo "{$count}/{$total} SUCCESS $newTotal>{$value['total_seconds_watching']}".PHP_EOL;
|
||||
}else{
|
||||
echo "{$count}/{$total} SKIPP $newTotal>{$value['total_seconds_watching']}".PHP_EOL;
|
||||
|
|
|
@ -209,7 +209,7 @@ if (!class_exists('Video')) {
|
|||
|
||||
$sql = "UPDATE videos SET total_seconds_watching = ?, modified = now() WHERE id = ?";
|
||||
//_error_log("addSecondsWatching: " . $sql . "={$this->id}");
|
||||
return sqlDAL::writeSql($sql, "ii", [$newTotal, $this->id]);
|
||||
return sqlDAL::writeSql($sql, "ii", [intval($newTotal), intval($this->id)]);
|
||||
}
|
||||
|
||||
public function updateViewsCount($total) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue