how can in insert i.e. a tar-archive in a blob ?
i want to do it with perl. i read allready about the quote function but i
wount work

#!/usr/bin/perl

use DBI;

# DB-Vars

$host = "ux4";
$database = "db_webera";
$user = "webera";
$pass = "webera";
$port = 3306;

$driver = "mysql";
$dsn = "DBI:$driver:database=$database;host=$host;port=$port";
$dbh = DBI->connect($dsn, $user, $pass);
#Binärdatei einlesen

open(DATEI, "heim.tar.gz");
foreach(<DATEI>) {
    $string = $string.$_;
}
$dbh->quote($string);
$sql_statement = "insert into table(tars) values('$string')";
$sth = $dbh->do($sql_statement);
$sth->execute;

DBD::mysql::db do failed: You have an error in your SQL syntax near
'ÔÓÛl¾gõCIÂw@®"c/à`lâ/rõþ÷7³kIH{NO¯^ªÅ»3³³³3]oCßKû¾
                                         Can't call method "execute" on an
undefined value at satz_anlegen.pl line 25, <DATEI> chunk 27

can anybody help me ??

thx

Reply via email to