in reply to Re^2: Question about joins?
in thread Question about joins?

Incomplete headers is a CGI problem, not a DBI problem. Try adding CGI::Carp as I show below so errors will print to the browser. Assuming you have created a *system* DSN for your database called MyDB, here's basic usage:
#!perl -w use strict; use CGI; use CGI::Carp qw(fatalsToBrowser); use DBI; my $dbh = DBI->connect( 'dbi:ODBC:MyDB' , $user , $pass , {RaiseError=>1} ); my $sth = $dbh->prepare("SELECT * FROM foo"); $sth->execute; print CGI::header(); while (my $row = $sth->fetch){ my @r = map { defined $_ ? $_ : '' } @$row; print "@r<br>\n"; } $dbh->disconnect;

Replies are listed 'Best First'.
Re^4: Question about joins?
by zackdade (Initiate) on Jan 14, 2005 at 17:01 UTC
    thanks - I'll have to try that out! ;)