Open FaimMedia opened 1 year ago
Since null
is not recognized as a reserved word in SQL
, no one can set a certain column to NULL
.
I think this is a serious bug.
is there any temporary solution or idea available?
@yahveh
I don't think there is any way to avoid this if you use Phalcon's SQL builder.
I think you can get an instance of the PDO class by getting db
from the DI container.
I think the only way is to write it in plain PHP using SQL that you have constructed yourself with that.
This is a way to avoid the bug that causes part of the column name to be mistaken for a reserved word, but it means you cannot use the functions provided in the Models class, so I think it is very inconvenient.
Questions? Forum: https://phalcon.io/forum or Discord: https://phalcon.io/discord
Describe the bug A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
PHQL, which looks okay:
MySQL query log, the real query that gets executed (notice the quotes around
CURDATE()
):Details
5.2.1
8.2.6