List:General Discussion« Previous MessageNext Message »
From:Gerald Clark Date:May 17 2001 5:11pm
Subject:Re: simple perl script
View as plain text  
You have two quotes after 'email'.

Todd Marks wrote:

> hello,
>     just want to start off saying that I am a complete newbie to mysql-sorry.  I have
> a perl script that I am simply trying to dump three variables(name CHAR(30), email(50),
> and score INT) to a database table that has already been established.  having some
> difficulty and wanted to post this to see if everything jives or I am a complete boob.
> -t.
> 
> #!/usr/bin/perl -w
> 
> use strict;
> use CGI qw(:standard);
> use DBI;
> 
> # change undef(s) to username and password if required
> my $dbh->connect('DBI:mysql:afp', undef, undef);
> 
> my $sth=$dbh->prepare("
>          INSERT INTO afp
>          VALUES (?,?,?)
> ");
> 
> $sth->execute('name','email'', '0'') || die "execute insert failed";
> $sth->finish();
> .............................................
> todd@stripped
> research and development
> www.digitalorganism.com
> t. (410) 342 - 1162
> f. (410) 342 - 1164  
> .............................................


-- 
Gerald L. Clark
gerald_clark@stripped

Thread
simple perl scriptTodd Marks17 May
  • Re: simple perl scriptGerald Clark17 May
  • Re: simple perl scriptTodd Marks17 May