php - 在 codeigniter 中清除 mysql 查询

标签 php mysql codeigniter

我想在codeigniter中实现这条mysql语句

$this->db->where('id', 30);
$this->db->update('sample_table', array('user_name'=>'John'));

// this line 

$this->db->where('sample_table_id', 30);
$this->db->update('sample_table_revision', array('user_name'=>'John'));

如何清除这一行的查询?

最佳答案

尝试

$this->db->reset_query()

阅读更多 here

关于php - 在 codeigniter 中清除 mysql 查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30316563/

相关文章:

php - 重定向标题功能不起作用

php - 为什么在使用 mail() php 发送邮件到 gmail 时不在电子邮件中显示类 css?

无法识别 php 变量。

php - 如何将 Sql 代码转换为 codeigniter 语法?

PHP - WHERE Join 中的 MYSQL 未知列

PHP 与 MySQL 查询未返回预期结果

MYSQL 函数调用左连接速度慢

要格式化的 SQL 列

codeigniter - 如何在 codeigniter 的库中加载助手?

PHP/SQL Multi INSERT INTO 不起作用