我有以下 codeigniter 模型函数:
function get_successful($project_id, $amount_backed){
$data = '';
$this->db->where('id', $project_id);
$this->db->where($amount_backed >= 'funding_goal'); //HELP HERE
$this->db->where('published', '1');
......
return $data;
}
我只需要获取变量$amount_backed
高于或等于字段的记录'funding_goal'
。
如何使用 codeigniters 活动记录来做到这一点?