Skip to content
Snippets Groups Projects
Commit 3ffe07f5 authored by Kjartan Mannes's avatar Kjartan Mannes
Browse files

- moving cvs-to-sql to contrib.

parent 933fd5e7
No related branches found
Tags 11-69241
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
#!/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();
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment