本文整理匯總了PHP中db_test::update方法的典型用法代碼示例。如果您正苦於以下問題:PHP db_test::update方法的具體用法?PHP db_test::update怎麽用?PHP db_test::update使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類db_test
的用法示例。
在下文中一共展示了db_test::update方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
$where = 'tfmglist';
break;
default:
break;
}
if ($agpmisagentpay == 0) {
// $query = "UPDATE tb_".$table." SET fd_".$where."_isagentpay = '2' WHERE fd_".$where."_bkordernumber = '".$bkordernumber."'";
// $db->query($query);
// $query1 = "UPDATE tb_agentpaymoneylist SET fd_agpm_isagentpay = '2' WHERE fd_agpm_bkordernumber = '".$bkordernumber."'";
// $db->query($query1);
// file_put_contents("text.txt", $query1);
// echo 'success';
$talbename = "tb_" . $table;
$dataArray = array("fd_" . $where . "_isagentpay" => "2");
$whereArray = "fd_" . $where . "_bkordernumber = '" . $bkordernumber . "'";
$result1 = $db->update($talbename, $dataArray, $whereArray);
unset($talbename);
unset($dataArray);
unset($whereArray);
$talbename = "tb_agentpaymoneylist";
$dataArray = array("fd_agpm_isagentpay" => "2");
$whereArray = "fd_agpm_bkordernumber = '" . $bkordernumber . "'";
$result2 = $db->update($talbename, $dataArray, $whereArray);
if ($result1 && $result2) {
echo 'success';
} else {
echo 'failure';
}
} else {
echo 'failure';
}