本文整理匯總了PHP中Branch::update方法的典型用法代碼示例。如果您正苦於以下問題:PHP Branch::update方法的具體用法?PHP Branch::update怎麽用?PHP Branch::update使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Branch
的用法示例。
在下文中一共展示了Branch::update方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: print_r
print_r(Branch::getCurrency('1'));
echo '</pre>';
?>
<p style="font-weight: bold;">Update</p><p><?php
$data = array();
$data['id'] = '2';
$data['address'] = "Suite 3, 22 Council St,\nHawthorn East";
$data['state'] = "Victoria";
$data['zip'] = "3123";
$data['country'] = 'AU';
$data['phone'] = '+61 03 9882 7164';
$data['fax'] = '+61 03 9882 9792';
?>
Before...<?php
echo '<pre>';
print_r(Branch::get('2'));
echo '</pre>';
Branch::update($data);
?>
After...<?php
echo '<pre>';
print_r(Branch::get('2'));
echo '</pre>';
?>
<p style="font-weight: bold;">Find</p><p><?php
$criteria = array('columns' => 'branches.branch, branches.address, branches.zip, branches.state, countries.country', 'match' => 'branches.phone LIKE \'%6363\'', 'joins' => 'countries ON countries.country_code = branches.country');
echo '<pre>';
print_r(Branch::find($criteria));
echo '</pre>';
?>
</p>