I’m using the Ruby mysql module.
I want to print out the results of a query and include the column names. I’m having trouble finding the method to give me an array of these names. I have the values as shown below.
result = my.query(“select * from foo”)
result.each do |row| puts row.join(‘,’) end
Thanks for the help!
1 Answer