小编Joe*_*Joe的帖子

如何删除多行?

所以我可以删除一行:

$this->db->delete($tableName,array("id"=>4));
Run Code Online (Sandbox Code Playgroud)

...但我无法弄清楚如何删除多行.我试过了:

$this->db->delete($tableName,array("id"=>4,"id"=5));
Run Code Online (Sandbox Code Playgroud)

以及:

$this->db->delete($tableName,array(array("id"=>4),array("id"=5)));
Run Code Online (Sandbox Code Playgroud)

......但它们都不起作用.我觉得这应该很容易.任何答案?

database codeigniter

15
推荐指数
2
解决办法
3万
查看次数

Percona的pt-table-sync:如何在多个表上运行?

在命令行中,这将成功更新table1:

pt-table-sync --execute h=host1,D=db1,t=table1 h=host2,D=db2
Run Code Online (Sandbox Code Playgroud)

但是,如果我想更新多个表,我不知道如何编写它.这只会更新table1并忽略其他表:

pt-table-sync --execute h=host1,D=db1,t=table1,table2,table3 h=host2,D=db2
Run Code Online (Sandbox Code Playgroud)

这给了我一个错误:

pt-table-sync --execute h=host1,D=db1 --tables table1,table2,table3 h=host2,D=db2
Run Code Online (Sandbox Code Playgroud)

任何人都有一个如何列出'-tables'的示例...以便它成功更新列表中的所有表?

database percona

5
推荐指数
1
解决办法
5247
查看次数

标签 统计

database ×2

codeigniter ×1

percona ×1