2012-02-24 11:07:47 +00:00
|
|
|
#encoding: utf-8
|
|
|
|
require 'mysql2'
|
|
|
|
|
2012-05-15 03:28:24 +00:00
|
|
|
$mid_site_connection
|
|
|
|
|
|
|
|
module MiddleSiteConnection
|
|
|
|
|
|
|
|
@mid_host = {
|
|
|
|
:host => 'mruling.nccu.edu.tw', #mruling.nccu.edu.tw or 127.0.0.1
|
|
|
|
:port => 3306, #3306 or 8005
|
|
|
|
:username => "rulingcom",
|
|
|
|
:password => "5w3iJQ9OJQMGhJibKP6YQje8",
|
|
|
|
:database => "RSS23_NCCU_MIDDLE",
|
|
|
|
:encoding => "UTF8"
|
|
|
|
}
|
|
|
|
|
|
|
|
def self.establish
|
2012-09-12 11:12:50 +00:00
|
|
|
# $mid_site_connection = Mysql2::Client.new(@mid_host)
|
2012-05-15 03:28:24 +00:00
|
|
|
end
|
2012-02-24 11:07:47 +00:00
|
|
|
|
2012-05-15 03:28:24 +00:00
|
|
|
end
|