本文整理汇总了PHP中FannieDispatch::conditionalExec方法的典型用法代码示例。如果您正苦于以下问题:PHP FannieDispatch::conditionalExec方法的具体用法?PHP FannieDispatch::conditionalExec怎么用?PHP FannieDispatch::conditionalExec使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FannieDispatch
的用法示例。
在下文中一共展示了FannieDispatch::conditionalExec方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: str_replace
$sales->lastYearTransactions($avg_trans);
} else {
$sales->lastYearTransactions(0);
}
/**
Sales last year, pro-rated
*/
$twoQ = str_replace('__table__', $dlog2, $salesQ);
$twoP = $dbc->prepare($twoQ);
$twoR = $dbc->execute($twoP, $args);
while ($row = $dbc->fetch_row($twoR)) {
$sales->obfCategoryID($row['id']);
$sales->superID($row['superID']);
$avg_sales = $row['sales'] / $num_days * 7;
$sales->lastYearSales($avg_sales);
if ($future) {
$sales->actualSales(0);
$labor = $class_lib::getLabor($dbc);
$labor->obfWeekID($week->obfWeekID());
$labor->obfCategoryID($row['id']);
foreach ($labor->find() as $l) {
$sales->growthTarget($l->growthTarget());
}
}
$sales->save();
}
}
}
}
FannieDispatch::conditionalExec();
示例2: form_content
$this->stats['done']++;
}
}
return $ret;
}
function form_content()
{
return '<div class="well"><legend>Instructions</legend>
Upload a CSV or XLS file containing likecode #s and prices. Cost
may also optionally be included.
<br />A preview helps you to choose and map columns to the database.
<br />The uploaded file will be deleted after the load.
</div><br />';
}
function results_content()
{
\COREPOS\Fannie\API\data\SyncLanes::pushTable('products');
$ret = '<p>Import Complete</p>';
$ret .= '<div class="alert alert-success">Updated ' . $this->stats['done'] . ' likecodes</div>';
if (count($this->stats['error']) > 0) {
$ret .= '<div class="alert alert-danger"><ul>';
foreach ($this->stats['error'] as $error) {
$ret .= '<li>' . $error . '</li>';
}
$ret .= '</ul></div>';
}
return $ret;
}
}
FannieDispatch::conditionalExec(false);