0
的比較值,我使用查詢表FuelPHP 1.3的模型時有問題。 條目表有三列('id','status','current','max')。如何在兩列FuelPHP
$result = Model_Entry::query()
->where('status', 1)
->where('count_current', '>=', 'count_max');
我想使用'where'方法的第三個參數作爲列名,但它在生成的查詢中作爲值處理。
例
SELECT * FROM `entries` AS `t0` WHERE `t0`.`status` = 1 AND `t0`.`count_current` >= 'count_max'
我的目標
SELECT * FROM `entries` AS `t0` WHERE `t0`.`status` = 1 AND `t0`.`count_current` >= `t0`.`count_max`
任何幫助,將不勝感激。