#!/usr/bin/perl -w #use CGI::Debug; use strict; use CGI; use DBI; my $q = new CGI; my $dbh = DBI->connect("DBI:mysql:database=test","test",""); my $sth = $dbh->prepare("select * from tab1"); $sth->execute; print $q->header, $q->start_html('test baze'), $q->start_table({-border=>undef}); while(my $ref = $sth->fetchrow_arrayref) { print $q->Tr({-align=>'center'},$q->td($$ref[0]),$q->td($$ref[1])); } $q->end_table; $q->end_html; $sth->finish; $dbh->diconnect; #### Content-Type: text/html; charset=ISO-8859-1 test baze Can't locate object method "diconnect" via package "DBI::db" (perhaps you forgot to load "DBI::db"?) at ./db.pl line 25.
Beki Bekic
Laza Lazic
Sima Simic