本文整理匯總了PHP中DBUtil::findUnique方法的典型用法代碼示例。如果您正苦於以下問題:PHP DBUtil::findUnique方法的具體用法?PHP DBUtil::findUnique怎麽用?PHP DBUtil::findUnique使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DBUtil
的用法示例。
在下文中一共展示了DBUtil::findUnique方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: ruleDeleted
public function ruleDeleted($rid)
{
$form = DBUtil::findUnique(DBUtil::$TABLE_ORDER_FORM, array(":rid" => $rid));
pdo_delete(DBUtil::$TABLE_ORDER_ITEM, array("fid" => $form['id']));
pdo_delete(DBUtil::$TABLE_ORDER_ORDER, array("fid" => $form['id']));
pdo_delete(DBUtil::$TABLE_ORDER_FORM, array('id' => $form['id']));
}
示例2: ruleDeleted
public function ruleDeleted($rid)
{
$egg = DBUtil::findUnique(DBUtil::$TABLE_EGG, array(":rid" => $rid));
pdo_delete(DBUtil::$TABLE_EGG_USER, array("egid" => $egg['id']));
pdo_delete(DBUtil::$TABLE_EGG_PRIZE, array("egid" => $egg['id']));
pdo_delete(DBUtil::$TABLE_EGG_RECORD, array("egid" => $egg['id']));
pdo_delete(DBUtil::$TABLE_EGG_SHARE, array("egid" => $egg['id']));
}
示例3: ruleDeleted
public function ruleDeleted($rid)
{
$wkj = DBUtil::findUnique(DBUtil::$TABLE_WKJ, array(":rid" => $rid));
pdo_delete(DBUtil::$TABLE_WKJ_FIREND, array("kid" => $wkj['id']));
pdo_delete(DBUtil::$TABLE_WKJ_USER, array("kid" => $wkj['id']));
}
示例4: doMobileBindUser
/**
* author: weizan012 QQ:800083075
* 綁定用戶
*/
public function doMobileBindUser()
{
global $_W, $_GPC;
$egid = $_GPC['egid'];
$tel = $_GPC['tel'];
$uname = $_GPC['uname'];
$openid = $this->getOpenId();
$user = DBUtil::findUnique(DBUtil::$TABLE_EGG_USER, array(":egid" => $egid, ":openid" => $openid));
$res = array();
if (empty($user)) {
$res['code'] = 500;
$res['msg'] = "用戶不存在";
die(json_encode($res));
}
DBUtil::updateById(DBUtil::$TABLE_EGG_USER, array('tel' => $tel, 'uname' => $uname), $user['id']);
$res['code'] = 200;
die(json_encode($res));
}
示例5: Notify_pub
$notify = new Notify_pub();
$notify->saveData($input);
$data = $notify->getData();
$ordersetting = DBUtil::findUnique(DBUtil::$TABLE_ORDER_SETTING, array(":appid" => $data['appid']));
if (empty($data)) {
$notify->setReturnParameter("return_code", "FAIL");
$notify->setReturnParameter("return_msg", "通用訂單參數格式校驗錯誤");
WeUtility::logging('info', "通用訂單回複參數格式校驗錯誤");
exit($notify->createXml());
}
if ($data['result_code'] != 'SUCCESS' || $data['return_code'] != 'SUCCESS') {
$notify->setReturnParameter("return_code", "FAIL");
$notify->setReturnParameter("return_msg", "通用訂單參數格式校驗錯誤");
WeUtility::logging('info', "通用訂單回複參數格式校驗錯誤");
exit($notify->createXml());
}
//更新表訂單信息
WeUtility::logging('info', "通知訂單更新");
if ($notify->checkSign($ordersetting['shkey'])) {
DBUtil::update(DBUtil::$TABLE_ORDER_ORDER, array("status" => 3, 'paytime' => TIMESTAMP), array("outno" => $data['out_trade_no']));
$order = DBUtil::findUnique(DBUtil::$TABLE_ORDER_ORDER, array(":outno" => $data['out_trade_no']));
$notify->setReturnParameter("return_code", "SUCCESS");
$notify->setReturnParameter("return_msg", "OK");
exit($notify->createXml());
} else {
$notify->setReturnParameter("return_code", "FAIL");
$notify->setReturnParameter("return_msg", "通用訂單簽名校驗錯誤");
WeUtility::logging('info', "通用訂單簽名校驗錯誤");
exit($notify->createXml());
}
WeUtility::logging('info', "通用訂單更新回複數據" . $data);
示例6: findTemplateSetting
/**
* author: 微讚
* @return bool
* 查找模板消息
*/
public function findTemplateSetting()
{
$ordertempalte = DBUtil::findUnique(DBUtil::$TABLE_ORDER_TEMPLATE, array(':weid' => $this->weid));
return $ordertempalte;
}
示例7: error_reporting
* @url http://www.cninone.com/
*/
error_reporting(1);
define('IN_MOBILE', true);
define("MON_WKJ", "mon_wkj");
require '../../framework/bootstrap.inc.php';
require_once "WxPayPubHelper/WxPayPubHelper.php";
require_once "monUtil.class.php";
require_once "dbutil.class.php";
$input = file_get_contents('php://input');
WeUtility::logging('info', "微砍價異步通知數據" . $input);
//WeUtility::logging('info',"商戶key數據".$kjsetting);
$notify = new Notify_pub();
$notify->saveData($input);
$data = $notify->getData();
$kjsetting = DBUtil::findUnique(DBUtil::$TABLE_WKJ_SETTING, array(":appid" => $data['appid']));
if (empty($data)) {
$notify->setReturnParameter("return_code", "FAIL");
$notify->setReturnParameter("return_msg", "參數格式校驗錯誤");
WeUtility::logging('info', "微砍價回複參數格式校驗錯誤");
exit($notify->createXml());
}
if ($data['result_code'] != 'SUCCESS' || $data['return_code'] != 'SUCCESS') {
$notify->setReturnParameter("return_code", "FAIL");
$notify->setReturnParameter("return_msg", "參數格式校驗錯誤");
WeUtility::logging('info', "微砍價回複參數格式校驗錯誤");
exit($notify->createXml());
}
//更新表訂單信息
WeUtility::logging('info', "通知訂單更新");
if ($notify->checkSign($kjsetting['shkey'])) {
示例8: findKJsetting
public function findKJsetting()
{
$kjsetting = DBUtil::findUnique(DBUtil::$TABLE_WKJ_SETTING, array(":weid" => $this->weid));
return $kjsetting;
}