ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
更新操作 ~~~ 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'])); ~~~