$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute([$this->name]);
- if ($statement->fetchColumn()) {
+ if ($statement->fetchSingleColumn()) {
throw new UserInputException('name', 'notUnique');
}
}
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute([$this->path]);
- if ($statement->fetchColumn()) {
+ if ($statement->fetchSingleColumn()) {
throw new UserInputException('path', 'notUnique');
}
}
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute([$this->name, $this->objectID]);
- if ($statement->fetchColumn()) {
+ if ($statement->fetchSingleColumn()) {
throw new UserInputException('name', 'notUnique');
}
}
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute([$this->path, $this->objectID]);
- if ($statement->fetchColumn()) {
+ if ($statement->fetchSingleColumn()) {
throw new UserInputException('path', 'notUnique');
}
}
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute($this->conditions->getParameters());
- return $statement->fetchColumn();
+ return $statement->fetchSingleColumn();
}
/**
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute([$sessionID]);
- return $statement->fetchColumn();
+ return $statement->fetchSingleColumn();
}
}
FROM wcf".WCF_N."_ad";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute();
- $maxShowOrder = $statement->fetchColumn();
+ $maxShowOrder = $statement->fetchSingleColumn();
if (!$maxShowOrder) $maxShowOrder = 0;
if (!$showOrder || $showOrder > $maxShowOrder) {
WHERE groupID = ?";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute([$groupID]);
- $maxShowOrder = $statement->fetchColumn() ?: 0;
+ $maxShowOrder = $statement->fetchSingleColumn() ?: 0;
if (!$showOrder || $showOrder > $maxShowOrder) {
$showOrder = $maxShowOrder + 1;
$this->parameters['data']['objectID'],
$this->objectType->objectTypeID
]);
- $pageCount = ceil($statement->fetchColumn() / 20);
+ $pageCount = ceil($statement->fetchSingleColumn() / 20);
$sql = "SELECT userID, likeValue
FROM wcf".WCF_N."_like
FROM wcf".WCF_N."_notice";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute();
- $maxShowOrder = $statement->fetchColumn();
+ $maxShowOrder = $statement->fetchSingleColumn();
if (!$maxShowOrder) $maxShowOrder = 0;
if (!$showOrder || $showOrder > $maxShowOrder) {
AND applicationPackageID = ?";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute([$customURL, $packageID]);
- if ($statement->fetchColumn()) {
+ if ($statement->fetchSingleColumn()) {
return false;
}
)";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute([$customURL, $packageID]);
- if ($statement->fetchColumn()) {
+ if ($statement->fetchSingleColumn()) {
return false;
}
FROM wcf".WCF_N."_paid_subscription";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute();
- $maxShowOrder = $statement->fetchColumn();
+ $maxShowOrder = $statement->fetchSingleColumn();
if (!$maxShowOrder) $maxShowOrder = 0;
if (!$showOrder || $showOrder > $maxShowOrder) {
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute([$ipAddress, TIME_NOW - USER_AUTHENTICATION_FAILURE_TIMEOUT]);
- return $statement->fetchColumn();
+ return $statement->fetchSingleColumn();
}
/**
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute([$userID, TIME_NOW - USER_AUTHENTICATION_FAILURE_TIMEOUT]);
- return $statement->fetchColumn();
+ return $statement->fetchSingleColumn();
}
}
WHERE optionName = ?";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute(['admin.user.accessibleGroups']);
- $optionID = $statement->fetchColumn();
- $statement->closeCursor();
+ $optionID = $statement->fetchSingleColumn();
if (!$optionID) throw new SystemException("Unable to find 'admin.user.accessibleGroups' user option");
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute([$pageID]);
- return $statement->fetchColumn() > 0;
+ return $statement->fetchSingleColumn() > 0;
}
}
FROM wcf".WCF_N."_import_mapping";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute();
- if ($statement->fetchColumn()) {
+ if ($statement->fetchSingleColumn()) {
CLIWCF::getReader()->println(StringUtil::stripHTML(WCF::getLanguage()->get('wcf.acp.dataImport.existingMapping.notice')));
CLIWCF::getReader()->println(WCF::getLanguage()->get('wcf.acp.dataImport.existingMapping.confirmMessage') . ' [YN]');
$statement = WCF::getDB()->prepareStatement($sql, 1);
$statement->execute([TIME_NOW - 86400 * 7]);
- return $statement->fetchColumn();
+ return $statement->fetchSingleColumn();
}
}
ModerationQueue::STATUS_PROCESSING
]);
- return $statement->fetchColumn() > 0;
+ return $statement->fetchSingleColumn() > 0;
}
/**
)";
$statement = WCF::getDB()->prepareStatement($sql, 1);
$statement->execute([$optionType]);
- $objectTypeID = $statement->fetchColumn();
+ $objectTypeID = $statement->fetchSingleColumn();
if ($objectTypeID === false) {
throw new SystemException("unknown object type '".$optionType."' given");
}
$date,
$date + 86399
]);
- $counter = $statement->fetchColumn();
+ $counter = $statement->fetchSingleColumn();
$sql = "SELECT (
SELECT COUNT(*)
$objectTypeID,
$date + 86400
]);
- $total = $statement->fetchColumn();
+ $total = $statement->fetchSingleColumn();
return [
'counter' => $counter,
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute($conditionBuilder->getParameters());
- return $statement->fetchColumn();
+ return $statement->fetchSingleColumn();
}
/**
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute($conditionBuilder->getParameters());
- return $statement->fetchColumn();
+ return $statement->fetchSingleColumn();
}
/**
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute($conditionBuilder->getParameters());
- return $statement->fetchColumn();
+ return $statement->fetchSingleColumn();
}
/**
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute($conditionBuilder->getParameters());
- return $statement->fetchColumn();
+ return $statement->fetchSingleColumn();
}
/**
AND likeValue = ?";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute([$date, $date + 86399, $this->likeValue]);
- $counter = intval($statement->fetchColumn());
+ $counter = intval($statement->fetchSingleColumn());
$sql = "SELECT COUNT(*)
FROM wcf".WCF_N."_like
AND likeValue = ?";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute([$date + 86400, $this->likeValue]);
- $total = intval($statement->fetchColumn());
+ $total = intval($statement->fetchSingleColumn());
return [
'counter' => $counter,
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute([$objectID]);
- return $statement->fetchColumn();
+ return $statement->fetchSingleColumn();
}
/**
FROM wcf".WCF_N."_user";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute();
- $this->startDate = $statement->fetchColumn();
+ $this->startDate = $statement->fetchSingleColumn();
}
}