ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
## 查询 ``` $info = pdo_fetch('select * from ' . tablename('ewei_shop_member') . ' where openid=:openid and uniacid=:uniacid limit 1', array(':uniacid' => $_W['uniacid'], ':openid' => $openid)); $members = pdo_fetchall("SELECT * FROM " . tablename("ewei_shop_member") . " WHERE status=1 and isagent=1 AND uniacid=" . $_W["uniacid"]); $value = pdo_fetchcolumn("SELECT credit1 FROM " . tablename('ewei_shop_member') . " WHERE uniacid=:uniacid and openid=:openid limit 1", array(':uniacid' => $_W['uniacid'], ':openid' => $openid)); $sql = 'DELETE FROM '.tablename('ewei_shop_bmwater_meslog').' WHERE id> 0 '.$condition; pdo_query($sql, $params); ``` ## 新增 ``` pdo_insert('ewei_shop_member', $member); $id = pdo_insertid(); ``` ## 修改删除 ``` //x修改 pdo_update('ewei_shop_member', $member, array('id' => $member['id'])); // 删除 pdo_delete('ewei_shop_commission_order', array('id' => $item['id'])); ``` ## 按ID当数组的KEY ``` $level2_agentids = pdo_fetchall('select id from ' . tablename('ewei_shop_member') . ' where agentid in( ' . implode(',', array_keys($level1_agentids)) . ') and isagent=1 and status=1 and uniacid=:uniacid', array(':uniacid' => $_W['uniacid']), 'id'); ``` ## 其他 ``` p('commission')->getOrderCommissions($orderid,$ogid); $set = m('common')->getSysset('wap'); $set = m('common') -> getPluginset('commission'); $set = $this -> getPluginset('commission'); $leveltype = intval($set['leveltype']); ```