本文整理汇总了PHP中mysql_class::insert方法的典型用法代码示例。如果您正苦于以下问题:PHP mysql_class::insert方法的具体用法?PHP mysql_class::insert怎么用?PHP mysql_class::insert使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mysql_class
的用法示例。
在下文中一共展示了mysql_class::insert方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: strtotime
logwrite('答应测试');
if (isset($Printer->params['id']) && isset($Printer->params['sta'])) {
if ($Printer->checkinput()) {
// echo 'sign right';
// $this->mysql->update(Mysite::$app->config['tablepre'].'wxback',$data,"id='".$id."'");
$orderid = $Printer->params['id'];
// usr=355841021188485&id=0003&ord=2&sta=0&sgn=E04A80BE97167584E7452FF54865171E
if ($Printer->params['sta'] == 0) {
if (!empty($orderid)) {
$data['is_print'] = 1;
$mysql->update($Mconfig['tablepre'] . 'order', $data, "id='" . $orderid . "'");
}
} else {
$data['orderid'] = $orderid;
$data['status'] = $Printer->params['sta'];
$mysql->insert($Mconfig['tablepre'] . 'printlog', $data);
}
} else {
echo 'sign wrong';
}
} else {
//usr
if (isset($Printer->params['usr']) && !empty($Printer->params['usr'])) {
$nowtime = strtotime(date('Y-m-d', time()));
//当天最小时间
$maxtime = strtotime(date('Y-m-d', time()) . ' 23:59:59');
$shopinfo = $mysql->select_one("select id,uid from " . $Mconfig['tablepre'] . "shop where IMEI = '" . $Printer->params['usr'] . "'");
if (!empty($shopinfo)) {
//当店铺不为空时
//获取订单
$orderlist = $mysql->select_one("select * from " . $Mconfig['tablepre'] . "order where shopid = '" . $shopinfo['id'] . "' and status > 0 and status < 3 and is_print = 0 and posttime > " . $nowtime . " and posttime < " . $maxtime . "");