💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
更新操作 ~~~ pdo_update('ewei_shop_order_op', array('remarksaler' => $_GPC['remark']), array('id' => $item['id'], 'uniacid' => $_W['uniacid'])); ~~~ 新增操作 ~~~ pdo_insert('ewei_shop_order_refund', $refund); ~~~ 修改操作 ``` pdo_update('ewei_shop_order_goods', $data, array('orderid' => $id, 'uniacid' => $_W['uniacid'])); ``` 删除操作 ``` pdo_delete('ewei_shop_order',['id'=>1]); pdo_delete('ewei_shop_order', "id IN ('".implode("','", $deleteid)."')"); ``` 查询一条数据 ~~~ pdo_get('ewei_shop_order',['id'=>1]); pdo_get('ewei_shop_order',['id'=>1],['title','num']);返回特定字段 ~~~ 查询单个字段 ~~~ pdo_getcolumn('ewei_shop_order',['id'=>1],'title'); ~~~ 查询记录条数 ~~~ pdo_count($tb,['id'=>1]) ~~~ 查询多个多个记录 ~~~ $billList = pdo_getall('ewei_shop_order_zhima_trans_no', ['ordersn' => $item['ordersn']], ['*']); ~~~ 原生查询 ~~~ $item = pdo_fetch("SELECT * FROM " . tablename('ewei_shop_order') . " WHERE id = :id and uniacid=:uniacid", array( ':id' => $id, ':uniacid' => $_W['uniacid'] )); ~~~ 求和 ~~~ $sum = pdo_fetchcolumn('select sum(price) from ' . tablename('ewei_shop_order') . ' where uniacid=:uniacid and openid=:openid and status=3', array(':uniacid' => $_W['uniacid'], ':openid' => $row['openid'])); ~~~