- moving cvs-to-sql to contrib.

4.0.x
Kjartan Mannes 2002-04-13 22:34:20 +00:00
parent 933fd5e7fd
commit 3ffe07f57c
1 changed files with 0 additions and 17 deletions

View File

@ -1,17 +0,0 @@
#!/usr/bin/perl -w
use DBI;
my $db_name = 'drupal';
my $db_user = 'drupal';
my $db_pass = 'drupal';
my $files = $ARGV[0];
my @message = <STDIN>;
my $message = join '' , @message;
my $user = $ARGV[1];
my $timestamp = time();
my $db = DBI->connect("DBI:mysql:$db_name", "$db_user", "$db_pass") or die "Couldn't connect to database: " . DBI->errstr;
$db->do("INSERT INTO cvs (user, files, message, timestamp) VALUES (". $db->quote($user) .", ". $db->quote($files) .", ". $db->quote($message) .", ". $db->quote($timestamp) .")") or die "Couldn't execute query: " . $db->errstr;
$db->disconnect();