本文整理匯總了PHP中newznab\db\Settings::queryDelete方法的典型用法代碼示例。如果您正苦於以下問題:PHP Settings::queryDelete方法的具體用法?PHP Settings::queryDelete怎麽用?PHP Settings::queryDelete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類newznab\db\Settings
的用法示例。
在下文中一共展示了Settings::queryDelete方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: deleteSingle
/**
* Deletes a single release by GUID, and all the corresponding files.
*
* @param array $identifiers ['g' => Release GUID(mandatory), 'id => ReleaseID(optional, pass false)]
* @param NZB $nzb
* @param ReleaseImage $releaseImage
*/
public function deleteSingle($identifiers, $nzb, $releaseImage)
{
// Delete NZB from disk.
$nzbPath = $nzb->getNZBPath($identifiers['g']);
if ($nzbPath) {
@unlink($nzbPath);
}
// Delete images.
$releaseImage->delete($identifiers['g']);
//Delete from sphinx.
$this->sphinxSearch->deleteRelease($identifiers, $this->pdo);
// Delete from DB.
$this->pdo->queryDelete(sprintf('
DELETE r, rn, rc, uc, rf, ra, rs, rv, re
FROM releases r
LEFT OUTER JOIN releasenfo rn ON rn.releaseid = r.id
LEFT OUTER JOIN releasecomment rc ON rc.releaseid = r.id
LEFT OUTER JOIN usercart uc ON uc.releaseid = r.id
LEFT OUTER JOIN releasefiles rf ON rf.releaseid = r.id
LEFT OUTER JOIN releaseaudio ra ON ra.releaseid = r.id
LEFT OUTER JOIN releasesubs rs ON rs.releaseid = r.id
LEFT OUTER JOIN releasevideo rv ON rv.releaseid = r.id
LEFT OUTER JOIN releaseextrafull re ON re.releaseid = r.id
WHERE r.guid = %s', $this->pdo->escapeString($identifiers['g'])));
}