企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
#### update(array $data, $buildSql = false) 单条更新,返回影响的条数 ``` $mysql->table('table')->where('id', 5)->update([ 'uid' => 123, 'type' => 2, 'currency' => ['currency', '+', 1] ]); ``` #### updateAll(array $data, $buildSql = false) 批量更新,返回影响的条数 ``` $data = [ ['uid' => 123, 'type' => 1, 'currency' => ['currency', '+', 1]], ['uid' => 222, 'type' => 2, 'currency' => ['currency', '+', -2]] ]; $mysql->table('table')->where('id', 5)->updateAll($data); ``` #### setInc($field, $incr = 1, $buildSql = false) 自增,返回影响的条数 ``` $mysql->table('table')->where('id', 5)->setInc('currency', 5); ``` #### setDec($field, $decr= 1, $buildSql = false) 自减,返回影响的条数 ``` $mysql->table('table')->where('id', 5)->setDec('currency', 5); ```