Method: WIKK::SQL.query
- Defined in:
-
lib/wikk_mysql2.rb,
lib/wikk_ruby_mysql.rb
Create WIKK::SQL instance and set up the mySQL connection, and Run a query on the DB server.
293 294 295 296 297 298 299 300 301 302 303 |
# File 'lib/wikk_mysql2.rb', line 293 def self.query(db_config, the_query) self.connect db_config do |sql| result = sql.query(the_query) if block_given? yield result return sql.affected_rows else return result end end end |