本文整理匯總了PHP中BlockController::duplicate方法的典型用法代碼示例。如果您正苦於以下問題:PHP BlockController::duplicate方法的具體用法?PHP BlockController::duplicate怎麽用?PHP BlockController::duplicate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類BlockController
的用法示例。
在下文中一共展示了BlockController::duplicate方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: duplicate
function duplicate($newBID)
{
$db = Loader::db();
foreach ($this->options as $opt) {
$v1 = array($newBID, $opt->getOptionName(), $opt->getOptionDisplayOrder());
$q1 = "insert into btSurveyOptions (bID, optionName, displayOrder) values (?, ?, ?)";
$db->query($q1, $v1);
$v2 = array($opt->getOptionID());
$newOptionID = get_insert_id();
$q2 = "select * from btSurveyResults where optionID = ?";
$r2 = $db->query($q2, $v2);
if ($r2) {
while ($row = $r2->fetchRow()) {
$v3 = array($newOptionID, $row['uID'], $row['ipAddress'], $row['timestamp']);
$q3 = "insert into btSurveyResults (optionID, uID, ipAddress, timestamp) values (?, ?, ?, ?)";
$db->query($q3, $v3);
}
}
}
return parent::duplicate($newBID);
}
示例2: duplicate
function duplicate($nbID)
{
parent::duplicate($nbID);
$this->loadBlockInformation();
$db = Loader::db();
foreach ($this->images as $im) {
$db->Execute('insert into btSlideshowImg (bID, fID, url, duration, fadeDuration, groupSet, position, imgHeight) values (?, ?, ?, ?, ?, ?, ?, ?)', array($nbID, $im['fID'], $im['url'], $im['duration'], $im['fadeDuration'], $im['groupSet'], $im['position'], $im['imgHeight']));
}
}