而經由笨框架生成查詢笨在FIND_IN_SET添加IS NULL
$this->db->select('id,memo,sent_to,sent_by,read_by,date')->from('memos')
->where("FIND_IN_SET('1',`sent_to`)")->order_by('`id`','DESC')->get();
我得到添加的誤差爲在查詢NULL自動
它產生
SELECT `id`, `memo`, `sent_to`, `sent_by`, `read_by`, `date` FROM `memos`
WHERE FIND_IN_SET('1',`sent_to`) IS NULL ORDER BY `id` DESC
而不是
SELECT `id`, `memo`, `sent_to`, `sent_by`, `read_by`, `date` FROM `memos`
WHERE FIND_IN_SET('1',`sent_to`) ORDER BY `id` DESC
剛剛升級到3.1.2,我發現這個問題真的很煩人。感謝您的解決方案。 –