請幫我解決這個問題..笨在查詢添加額外的錯誤報價
我要去的MySQL做查詢,但代碼點火器讀我的格式錯誤的查詢:
我的查詢:
$this->db->select('substring(sbj_prog,1,5) as prog , count(sbj_prog) as bil');
$this->db->from('sbj_app');
$this->db->group_by('prog');
$this->db->limit('10');
這是多麼笨讀
SELECT substring(sbj_prog, `1`, `5)` as prog, count(sbj_prog) as bil FROM (`sbj_app`) GROUP BY `prog` LIMIT 10
問題是爲什麼多餘的報價被添加到5)
非常感謝。