本文整理汇总了PHP中Province::InsertQuery方法的典型用法代码示例。如果您正苦于以下问题:PHP Province::InsertQuery方法的具体用法?PHP Province::InsertQuery怎么用?PHP Province::InsertQuery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Province
的用法示例。
在下文中一共展示了Province::InsertQuery方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: trim
$bcode = str_replace(" ", " ", trim($bcode));
$nQuery = "select * from {$preft} where {$prefd}='{$bcode}'";
echo $nQuery;
$nProvince = new Province();
$nProvince->Query1($nQuery);
$nRecord = $nProvince->dbResultOut;
if ($nRecord == 0) {
$bname = strtoupper($bname);
$sQuery = "select * from {$preft} where {$prefc}='{$bname}' and blgf_code='{$blgf_codes}'";
$nProvince = new Province();
$nProvince->Query1($sQuery);
$chkDuplicate = $nProvince->dbResultOut;
if ($chkDuplicate == 0) {
$dQuery = "insert into {$preft} values ('{$bname}', '{$bname}',now(),now(),'{$usern}', '{$blgf_codes}')";
$nProvince = new Province();
$nProvince->InsertQuery($preft, $dQuery);
?>
<body onLoad='javascript:alert("Record Successfully Saved");'></body>
<?php
} else {
?>
<body onload='javascript:alert("Duplicate Record Found");'></body>
<?php
// echo "<div align=center>DUPLICATE RECORD</div>";
}
} elseif ($com == 'edit') {
$bname = strtoupper($bname);
$sQuery = "update {$preft} set {$prefd}='{$bname}', blgf_code='{$blgf_codes}' where {$prefc}='{$bbo}'";
$nProvince = new Province();
$nProvince->UpdateQuery($preft, $sQuery);
$blgf_codes = '';