package WebDB; use warnings; use strict; use DBI; use utf8; use Encode qw(decode encode); binmode(STDOUT, ':utf8'); my $host_name = "xxx"; my $db_name = "xxx"; my $dsn = "DBI:mysql:database=$db_name;host=$host_name;"; # Connect to MySQL server, using hardwired name and password sub connect { return (DBI->connect ($dsn, "xxx", "xxx", {RaiseError => 1, mysql +_enable_utf8 => 1}) or die ("Cannot connect: $DBI::errstr")); } sub Get_Item_Table { my $dbh = shift; my $ref = shift; my $sql_item = qq(SELECT ID_catalogo, tavoletta, scuola, tipolog +ia, tipo, copia_di FROM CATALOGO WHERE tavoletta LIKE '$ref%'); my $sth_item = $dbh->prepare($sql_item); $sth_item->execute(); return($sth_item); } sub parsing { my $riga = shift; # ? e ! $riga =~ s/(\?)/<sup>$1<\/sup>/g; $riga =~ s/(\!)/<sup>$1<\/sup>/g; $riga =~ s/(@)/ /g; $riga =~ s/ / /g; $riga; } 1;
In reply to Re^4: from 5.8 to 5.10
by frasco
in thread from 5.8 to 5.10
by frasco
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |