Does a Go Mysql driver exist that supports multiple statements within a single string?

前端 未结 5 2127
生来不讨喜
生来不讨喜 2020-12-18 04:44

I\'m trying to find a MySql driver that i can use with Go which supports issuing multiple SQL statements in one call. For example i might wish to create a database using the

5条回答
  •  清酒与你
    2020-12-18 05:28

    Bluntly put, do not issue multiple statements in a single call. It is a security issue. If a hacker can get in a little bit, he can take over your machine. (Read about "SQL Injection".)

    Stored Routines give you a safe way to combine statements (with some restrictions).

提交回复
热议问题