Let DBI quote it for you..
$month = $dbh->quote($month);
$day = $dbh->quote($day);
$hms = $dbh->quote($hms);
$host = $dbh->quote($host);
$description = $dbh->quote($description);
$dbh->do("INSERT INTO tb1 (month, day, hms, host, description) VALUES
($month, $day, $hms, $host, $description)");
---------------------------
Jason H. Frisvold
Senior ATM Engineer
Engineering Dept.
Penteledata
CCNA Certified - CSCO10151622
[EMAIL PROTECTED]
---------------------------
"Imagination is more important than knowledge. Knowledge is limited.
Imagination encircles the world." -- Albert Einstein [1879-1955]
-----Original Message-----
From: Fontenot, Paul [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 17, 2002 3:46 PM
To: Perl - Beginners (E-mail)
Subject: tick marks?
Hi here is what I'm trying to do, I need to insert this into a table in
a database.
Jun 17 04:48:28 localhost kernel: Checking 'hlt' instruction... OK.
using this code:
$dbh->do("INSERT INTO tb1 (month, day, hms, host, description) VALUES
('$month', '$day', '$hms', '$host', '$description')");
BUT the database complains because of the ' marks around $description in
the insert statement. Hopefully someone has this one already firgured
out.
Thanks,
Paul
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]