我想通过编码点火器查询比较 where 条件中的两个值。
请尽快帮助我。
<?php
$This->db->select('$a');
$This->db->where('a',$a and 'b','$b');
$This->db->from('tab');
$get = $this->db->get();
?>
<?php
$This->db->select('$a');
$cond = array(
'a'=> $a,
'b'=>$b
);
$This->db->where($cond);
$This->db->from('tab');
$get = $this->db->get();
?>
当您想要在 Where 子句中使用多个条件时,您必须根据代码点火器活动类使用关联数组,请参阅 Codeigniter 文档以获取更多信息。