[JDEV] Re: Jabber and Blogger

jer at email.jabber.org jer at email.jabber.org
Thu Aug 16 14:50:23 CDT 2001


talli,

Here's the perl snippets in the jogger script in cvs as "jogger" that actually does the logging:

  my $DBHandle = DBI->connect("DBI:mysql:database=".$config{mysql}->{dbname},$config{mysql}->{username},$config{mysql}->{password});

  my $command = "INSERT INTO logs (jid, date, subject, body) VALUES('$from', NOW(), '$subject','$body')";

  my $sth = $DBHandle->prepare($command);
  $sth->execute;
  $sth->finish();

So... I'm no DBI or SQL/DB expert, but if you have the Postgres DBI/DBD perl drivers it should be pretty straight forward.  The createDB script could be similiarly modified to create the table.

Jer



More information about the JDev mailing list