小编Gaz*_*ifi的帖子

Symfony SQL 错误消息:“SQLSTATE[42000]:语法错误或访问冲突:1064”

我有一个我不理解的错误:

\n\n
\n

执行 \'INSERT INTO achats (year_month,\n modele, code_reference, date_de_ajout, cout, date_de_achat,\nimportance, ordre, type, location_de_achat) VALUES (?, ?, ?, ?, ?, ?,\ 时发生异常n ?, ?, ?, ?)\' ,参数为 ["2020-07", "St\\u2011Luc\n (echo\\u2011graphie)", null, "2020-01-23", 2.97, "2020- 01-23", 空,\n 13, 24, 7]:

\n\n

SQLSTATE[42000]: 语法错误或访问冲突: 1064 您的 SQL 语法中有\n 错误;检查与您的 MySQL 服务器版本相对应的手册,了解在第 1 行的 \'year_month、\n modele、code_reference、date_de_ajout、cout、date_de_achat、importan\'\n 附近使用的正确语法

\n
\n\n

我的实体是:

\n\n
<?php\n\nnamespace App\\Entity;\n\nuse Doctrine\\ORM\\Mapping as ORM;\n\nuse Symfony\\Component\\Validator\\Constraints as Assert;\n\n/**\n * Achats\n *\n * @ORM\\Table(name="achats", indexes={@ORM\\Index(name="type", columns={"type", "location_de_achat"}), @ORM\\Index(name="location_de_achat", columns={"location_de_achat"}), @ORM\\Index(name="Modele", columns={"Modele"}), …
Run Code Online (Sandbox Code Playgroud)

php mysql symfony

2
推荐指数
1
解决办法
3767
查看次数

标签 统计

mysql ×1

php ×1

symfony ×1