You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
int status = mysql_query(test_conn,
"use mytest ; \ DROP TABLE IF EXISTS test_table;\ CREATE TABLE test_table(id INT);\ INSERT INTO test_table VALUES(10);\ INSERT INTO test_table VALUES(20);\ INSERT INTO test_table VALUES(30);\ UPDATE test_table SET id=20 WHERE id=10;\ SELECT * FROM test_table;");
the above query will got err:
Unknown database 'mytest; DROP TABLE IF EXISTS test_table; CREATE TABLE test_table(id INT); INSERT INTO test_table VALUES(10); INSERT INTO test_table VALUES(20); INSERT INTO test_table VALUES(30); UPDATE test_table SET id=20 WHERE id=10; SELECT * FROM test_table'
complete c++ code for testing:
mysql_real_connect.txt
(change name post .txt to .cpp)
compile example:
g++ -g -o multiQuery.o -L/usr/local/mysql/lib -I/usr/local/mysql/include -lmysqlclient mysql_real_connect.cpp
The text was updated successfully, but these errors were encountered:
version:5.6.29-dble-2.18.02.4-20180606044319
the above query will got err:
Unknown database 'mytest; DROP TABLE IF EXISTS test_table; CREATE TABLE test_table(id INT); INSERT INTO test_table VALUES(10); INSERT INTO test_table VALUES(20); INSERT INTO test_table VALUES(30); UPDATE test_table SET id=20 WHERE id=10; SELECT * FROM test_table'
complete c++ code for testing:
mysql_real_connect.txt
(change name post .txt to .cpp)
compile example:
g++ -g -o multiQuery.o -L/usr/local/mysql/lib -I/usr/local/mysql/include -lmysqlclient mysql_real_connect.cpp
The text was updated successfully, but these errors were encountered: