本文整理匯總了PHP中nzedb\db\Settings::version方法的典型用法代碼示例。如果您正苦於以下問題:PHP Settings::version方法的具體用法?PHP Settings::version怎麽用?PHP Settings::version使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類nzedb\db\Settings
的用法示例。
在下文中一共展示了Settings::version方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: initiateForWrite
/**
* Initiate class vars when writing NZB's.
*
* @param int $groupID
*
* @access public
*/
public function initiateForWrite($groupID)
{
$this->groupID = $groupID;
// Set table names
if ($this->tablePerGroup === true) {
if ($this->groupID == '') {
exit("{$this->groupID} is missing\n");
}
$this->_tableNames = ['cName' => 'collections_' . $this->groupID, 'bName' => 'binaries_' . $this->groupID, 'pName' => 'parts_' . $this->groupID];
} else {
$this->_tableNames = ['cName' => 'collections', 'bName' => 'binaries', 'pName' => 'parts'];
}
$this->_collectionsQuery = sprintf('SELECT %s.*, UNIX_TIMESTAMP(%s.date) AS udate, groups.name AS groupname
FROM %s
INNER JOIN groups ON %s.group_id = groups.id
WHERE %s.releaseid = ', $this->_tableNames['cName'], $this->_tableNames['cName'], $this->_tableNames['cName'], $this->_tableNames['cName'], $this->_tableNames['cName']);
$this->_binariesQuery = 'SELECT id, name, totalparts FROM ' . $this->_tableNames['bName'] . ' WHERE collection_id = %d ORDER BY name';
$this->_partsQuery = 'SELECT DISTINCT(messageid), size, partnumber FROM ' . $this->_tableNames['pName'] . ' WHERE binaryid = %d ORDER BY partnumber';
$this->_nzbHeadString = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE nzb PUBLIC \"-//newzBin//DTD NZB 1.1//EN\" \"http://www.newzbin.com/DTD/nzb/nzb-1.1.dtd\">\n<!-- NZB Generated by: nZEDb " . $this->pdo->version() . ' ' . htmlspecialchars(date('F j, Y, g:i a O'), ENT_QUOTES, 'utf-8') . " -->\n<nzb xmlns=\"http://www.newzbin.com/DTD/2003/nzb\">\n<head>\n <meta type=\"category\">%s</meta>\n <meta type=\"name\">%s</meta>\n</head>\n\n";
}
示例2: version
public function version()
{
return $this->pdo->version();
}