指尖上的记忆指尖上的记忆
首页
  • 基础
  • Laravel框架
  • Symfony框架
  • 基础
  • Gin框架
  • 基础
  • Spring框架
  • 命令
  • Nginx
  • Ai
  • Deploy
  • Docker
  • K8s
  • Micro
  • RabbitMQ
  • Mysql
  • PostgreSsql
  • Redis
  • MongoDb
  • Html
  • Js
  • 前端
  • 后端
  • Git
  • 知识扫盲
  • Golang
🌟 gitHub
首页
  • 基础
  • Laravel框架
  • Symfony框架
  • 基础
  • Gin框架
  • 基础
  • Spring框架
  • 命令
  • Nginx
  • Ai
  • Deploy
  • Docker
  • K8s
  • Micro
  • RabbitMQ
  • Mysql
  • PostgreSsql
  • Redis
  • MongoDb
  • Html
  • Js
  • 前端
  • 后端
  • Git
  • 知识扫盲
  • Golang
🌟 gitHub
symfony7下SQL插入语句的时候单引号问题
symfony7下有如下sql 迁移
$this->addSql('INSERT INTO event_submission_publication_preference_types (id, name) VALUES (4, "I would like to contribute a full manuscript to the organizing journal's conference special issue.")');

但是name的值有个 journal's 单引号,冲突了

解决办法:
$this->addSql('INSERT INTO event_submission_publication_preference_types (id, name) VALUES (?, ?)', [
            4,
            "I would like to contribute a full manuscript to the organizing journal's conference special issue.",
        ]);