On 11 Jan 2002, at 9:07, Terrence Brannon wrote:

> 
> On Friday, January 11, 2002, at 07:09 AM, Bart Lateur wrote:
> 
> > [beginners list snipped]
> >
> > On Fri, 11 Jan 2002 11:40:03 +0100, Marius Keraitis wrote:
> >
> >> Second step is to show every table contents (by clicking on link
> >> with table name). To do this I need to know how many columns is in
> >> table, and all names of columns in table.
> >
> > You can do (very portable):
> >
> >     my $sth = $dbh->prepare("SELECT * FROM $table");
> 
> its a shame that it is not just as portable to limit the result 
> set to 1 row...

I don't know how portable this one is, but doesn't

my $sth = $dbh->prepare("SELECT * FROM $table where 1=2");

set all the column metadata in $sth without returning any rows?


Bodo

Reply via email to