How to insert/create stored procedures in mySQL from PHP?

后端 未结 3 1276
被撕碎了的回忆
被撕碎了的回忆 2021-01-02 22:05

I\'ve got a number of stored procedures made with the MySQL Workbench. They work just fine when use MySQL workbench to put them into my test DB.

Now I am preparing

3条回答
  •  旧时难觅i
    2021-01-02 22:35

    To sum it up:

    DELIMITER is implemented client-side, not serverside.

    If you have a good driver or API, it may take care of this. PHP mysql / mysqli, as of now, do not.

    If you need to use a different delimiter (e.g. because the default delimiter appears inside scripts), you have to encode/escape your SQL yourself or break it up so you don't need to change the delimiter. No help from PHP here.

提交回复
热议问题