Question

Or another way to run multiple queries in one function call in mysql2 gem?

Was it helpful?

Solution

When you setup a new client you can add it to the flags

client = Mysql2::Client.new(:host => 'localhost', :database => 'my_db', :username => "root", :password => "", :flags => Mysql2::Client::MULTI_STATEMENTS)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top