List:General Discussion« Previous MessageNext Message »
From:Richard Reina Date:March 20 2000 3:12am
Subject:DBI INSERT INTO from an array?
View as plain text  
I'm trying to teach myself PERL DBI/MySQL and I'm am having trouble
getting this short script to work.  I'm running this on RedHat 5.2.  I
guess this is not the proper method for inserting a record from and
array into a MySQL table via DBI.  Can someone please let me know how I
can fix this script.

Richard

#!/usr/bin/perl5 -w

use DBI;

my $db = DBI->connect("DBI:mysql:test","root","whiskey");
my @quote = (NULL,'Lakebluff','IL','Milwaukee','WI',485.00,57.2,1043,'48
Van',2000-03-19);


my $sth = "INSERT INTO oldqts VALUES @quote"

my $oldqts_input = $db->prepare($sth);
$oldqts_input->execute;


$db->disconnect;


Thread
DBI INSERT INTO from an array?Richard Reina20 Mar
  • Re: DBI INSERT INTO from an array?Jeremy Cole20 Mar
  • Re: DBI INSERT INTO from an array?Jeremy Cole20 Mar
  • Re: DBI INSERT INTO from an array?Jeremy Cole20 Mar