search for: db_database

Displaying 2 results from an estimated 2 matches for "db_database".

2010 Jun 16
2
class methods from module where active rec is involved
...similar approach where active record is not involved, access to the class methods seems to work ok. What can I do to make this work or so that I can access the class methods ? ################################## require ''active_record'' DB_Host = ''localhost'' DB_Database = ''proj1'' DB_Port = 5432 ActiveRecord::Base.establish_connection( :adapter => "postgresql", :host => DB_Host, :database => DB_Database, :username => "me" # :password => "secret" ) module ModelClassMethods def mycreate(pkey...
2005 Jul 15
0
Queue_log stats
...39;0', # id tinytext NOT NULL #) TYPE=MyISAM; use DBI; use IO::File; my $opt_debug = 0; # if you want postgres change this to "Pg" my $db_type = "mysql"; my $db_host = "127.0.0.1"; my $db_user_name = 'username'; my $db_password = 'password'; my $db_database = 'asteriskstat'; my $dbh = DBI->connect("DBI:$db_type:dbname=$db_database;host= $db_host;", $db_user_name, $db_password); open(FIFO, "< /var/log/asterisk/queue_log") or die "Can't open queue_log : $!\n"; while (1) { $message = <...