Welcome Guest, Not a member yet? Register   Sign In
updated_at is not updating
#9

(This post was last modified: 08-19-2021, 12:12 PM by ikesela.)

(08-19-2021, 05:25 AM)but nneves Wrote:
(08-19-2021, 04:12 AM)ikesela Wrote: this the problem, when you set to false, not working with updated_at (for auto update datetime).

$builder->set('views', 'views+1', false);

* this maybe bug

I've tested either with false, true or without any value and the updated_at field is not updated

(08-19-2021, 04:59 AM)nfaiz Wrote: because you creating another builder?

I can't use save/update because my primary key is composed with two fields.
I've tried too with $db->query('UPDATE string SET views = views + 1 ... and doesn't work either ...


I have this problem too before, when using this line:

$builder->set('views', 'views+1', false);

my noob solution is to turn off timestamp: $useTimestamps = false;

then i did update updated_at manually .

i hope there are solution in future to make it works when function is used ( problem maybe at builder).
Reply


Messages In This Thread
updated_at is not updating - by nneves - 08-18-2021, 04:50 PM
RE: updated_at is not updating - by InsiteFX - 08-19-2021, 01:34 AM
RE: updated_at is not updating - by nneves - 08-19-2021, 02:21 AM
RE: updated_at is not updating - by ikesela - 08-19-2021, 04:12 AM
RE: updated_at is not updating - by nfaiz - 08-19-2021, 04:59 AM
RE: updated_at is not updating - by nneves - 08-19-2021, 05:25 AM
RE: updated_at is not updating - by ikesela - 08-19-2021, 12:12 PM
RE: updated_at is not updating - by craig - 08-19-2021, 07:52 AM
RE: updated_at is not updating - by wdeda - 08-19-2021, 10:28 AM
RE: updated_at is not updating - by nneves - 08-19-2021, 01:43 PM
RE: updated_at is not updating - by InsiteFX - 08-20-2021, 01:27 AM
RE: updated_at is not updating - by paliz - 08-20-2021, 05:38 AM



Theme © iAndrew 2016 - Forum software by © MyBB