List:General Discussion« Previous MessageNext Message »
From:Rich Bowen Date:July 28 1999 1:52am
Subject:Re: Sample perl script
View as plain text  
Richard Reina wrote:
> 
> Can someone send me a very simple  perl script that connects to a mysql
> database and modifies a table.

use DBI;
use strict;
my $dbh = DBI->connect('DBI:mysql:database', 'username',
			'password');
my $sth = $dbh->prepare("insert into tablename
			(fname,lname,email)
			values
			('Rich','Bowen','junkmail@stripped')
			");
$sth->execute;


That's about as simple as it gets.

Rich
-- 
It seems to me as we make our own few circles 'round the sun
We get it backwards and our seven years go by like one 
          --Rush, 'Dog Years' (Test for Echo, 1996)
Thread
Sample perl scriptRichard Reina28 Jul
  • Re: Sample perl scriptRich Bowen28 Jul
    • Re: Sample perl scriptThimble Smith28 Jul
      • Re: Sample perl scriptPaul DuBois28 Jul
  • Installing on NTKevin Anderson28 Jul
    • Installing on NTJani Tolonen29 Jul
  • Re: Installing on NTChristian Mack28 Jul
Re: Sample perl scriptTom Cunningham28 Jul