Welcome Guest, Not a member yet? Register   Sign In
Colon in MySql functions is breaking Query
#1

Hi.

I am using CodeIgniter 4 (rc3) and want to select DATETIME column in desired format (ex. 30.12.2019 12:56:00). But the problem is in colon : which is breaking my query. This is probably because of Named Bindings.
Is there any solution or a way around this?

Code:
SELECT id, title, DATE_FORMAT(date_time, '%d.%m.%Y %H:%i:%s') AS dt FROM table1...

$this->db->query($sql)->getResult()
Reply


Messages In This Thread
Colon in MySql functions is breaking Query - by bender - 11-10-2019, 04:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB