CC-4841: Silan script
done
This commit is contained in:
parent
bb2f9316af
commit
f70ca93b53
6 changed files with 180 additions and 0 deletions
|
@ -1111,6 +1111,29 @@ SQL;
|
|||
|
||||
return $rows;
|
||||
}
|
||||
|
||||
public static function getAllFilesWithoutSilan() {
|
||||
$con = Propel::getConnection();
|
||||
|
||||
$sql = <<<SQL
|
||||
SELECT f.id,
|
||||
m.directory || f.filepath AS fp
|
||||
FROM cc_files as f
|
||||
JOIN cc_music_dirs as m ON f.directory = m.id
|
||||
WHERE file_exists = 'TRUE'
|
||||
AND silan_check IS FALSE Limit 100
|
||||
SQL;
|
||||
$stmt = $con->prepare($sql);
|
||||
|
||||
if ($stmt->execute()) {
|
||||
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
} else {
|
||||
$msg = implode(',', $stmt->errorInfo());
|
||||
throw new Exception("Error: $msg");
|
||||
}
|
||||
|
||||
return $rows;
|
||||
}
|
||||
|
||||
/* Gets number of tracks uploaded to
|
||||
* Soundcloud in the last 24 hours
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue