
23.03.2008, 01:11
|
|
♠ ♦ ♣ ♥
Регистрация: 18.05.2006
Сообщений: 1,828
Провел на форуме: 8042357
Репутация:
3742
|
|
http://sql-info.de/mysql/examples/Perl-DBI-examples.html
т.е. чтото типа
PHP код:
#!perl
use strict;
use warnings;
use DBI;
$dbh = DBI->connect('DBI:mysql:databasename', 'username', 'password'
) || die "Could not connect to database: $DBI::errstr";
$dbh->disconnect();
$dbh = DBI->connect('DBI:mysql:databasename;host=domain.com', 'username', 'password',
{ RaiseError => 1 }
);
$sth = $dbh->prepare('SELECT val FROM exmpl_tbl WHERE id=1');
$sth->execute();
$result = $sth->fetchrow_hashref();
print "Value returned: $result->{val}\n";
__________________
Привет! Меня зовут Джордж, и я хотел бы рассказать вам про реинкарнацию (ц) 2x2
|
|
|