开发者

How to compare values from two databases(mysql) in rails-3 application

开发者 https://www.devze.com 2023-04-12 17:47 出处:网络
How to compare under given two fields in rails application Database1 : report_db, table name : detail,

How to compare under given two fields in rails application

  • Database1 : report_db,

    • table name : detail,
    • field : v_id
  • Database2 : gen_db,

    • table name : vulnerabilities,
    • field : o_id

Database.yml file

  • development:

  • report:

    • adapter: mysql
    • database: report_db
    • host: localhost
    • username: root
    • password: jeet

If any gem is required then plz also mention how to use that gem in rails application


This seems to be a similar question, which gives the option of switching connection dynamically using the establish_connection call and specifying the db connection details.

Its one way to solve your problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号