Hi,
I am sure there are cleaner ways, but this works
for my scripts just fine.



use DBI;
$drh=DBI->install_driver('mysql') || warn "no Driver\n";
$dbh=$drh->connect("search:localhost","user_1") or warn "No connect\n";

$cursor=$dbh->prepare("select email from opt2 where resend=100");
$cursor->execute;

while($this_addr = $cursor->fetchrow) {
        push @recps, $this_addr;
}








On Fri, 31 Aug 2001, Rudy Metzger wrote:

> maybe not the 100% correct list, but then again...
> 
> -------------------------------- SCRIPT
> ----------------------------------------------------------------------------
> -----
> 
> #!/usr/bin/perl -w
> use DBI;
> 
> my $dbh = DBI->connect( "DBI:mysql:database=xxx", "xxx", "xxx" )
>     or die( "Cannot connect to DB\n" );
> 
> my $sth = DBI->do( "INSERT INTO mytable VALUES (2,'some text')" );
> 
> $dbh->disconnect
>     or warn( "Disconnection failed: $DBI::errstr\n" );
> 
> exit;
> 
> ---------------------------- ERROR MESSAGE ---------------------------
> Can't locate auto/DBI/do.al in @INC (@INC contains:
> /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0
> /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0
> /usr/lib/perl5/site_perl .) at ./tst.pl line 7
> 
> ------ OTHER INFORMATION -----------------------------------------------
> Linux, distribution Redhat 7.0
> DBI.1.20
> DBD-mysql-2.0902
> perl v5.6.0
> 
> anyone experienced a similar problem?
> grateful for any information whatsoever...
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to