On 02/25/2018 02:01 AM, Suliman wrote:
What about string interpolation like:

conn.exec("INSERT INTO table_name VALUES ({i}, {s})"); ?

Instead of:
conn.exec("INSERT INTO table_name VALUES (?, ?)", i, s);

The syntax is purely, 100% server-side. Mysql-native just passes the whole string, question marks and all, straight off to the server. So whatever syntax the server supports, mysql-native supports. Whatever the server doesn't, mysql-native doesn't.

I've heard about a MySQL (I think) syntax like this:
"INSERT INTO table_name VALUES (:i, :s)"

But I haven't given it a try, and I don't know about its compatability.

Reply via email to