mysql | Codeigniter活动记录为查询增加了额外的滴答声
技术问答
253 人阅读
|
0 人回复
|
2023-09-12
|
试着通过codeigniter在查询活动记录的操作时,由于增加了额外的 ````
9 h% }0 K- V9 Q/ O6 D g这是Codeigniter尝试执行查询
) C. s1 N( A$ d1 ~6 a. G* uSELECT `T`.`id` AS TimeSheetID,DATE_FORMAT(T.date_created,`'%M')` AS MonthName FROM (`timesheet` T)但这是我实际上要执行的查询。4 W' k! {( X9 [% R7 h# i7 E( n2 b2 r
SELECT `T`.`id` AS TimeSheetID,DATE_FORMAT(T.date_created,'%M') AS MonthName FROM (`timesheet` T)如何逃避活动记录中添加的多余冒号?
W6 Y6 {" s w* Q! m1 d( ^5 x6 b9 v为了查询正常工作,我如何编写这句话?
5 m# p0 r% u D+ C& `$this->db->select(" T.id AS TimeSheetID, DATE_FORMAT(T.date_created,'%M') AS MonthName"); % E6 C! f: @) F$ n, x$ \' J! o
解决方案: |
|
|
|
|
|