Hello,
I have a table with fields with values allowing NULL and with default NULL
this are date fields.
…
||cheque_fecha
DATE NULL DEFAULT NULL,|
||cheque_fecha_pagodif
DATE NULL DEFAULT NULL,|
…
When I try to save into the database I get this error:
General error: 1364 Field ‘cheque_fecha’ doesn’t have a default value. The SQL statement executed was: INSERT INTO t_recibo_valor
(fk_recibo_id
, fk_valortipo
, importe
, cheque_nro
, cheque_titular
, cheque_datos
) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4, :yp5)
As you can see, Yii don’t send the field ‘cheque_fecha’,
Why is Mysql (5.7.24) returning this error ?
I try usind the defaul rule in the model.
setting the attribute to : new CDbExpression(‘NULL’);
But nothing works
My Yii is 1.1.14
Mysql 5.7.24
Any Idea what can I do?