my $dbh = DBI->connect( ... );
my $sth = $dbh->prepare( "SHOW COLUMNS FROM $table" ) or die;
$sth->execute( ) or die;
my @columns;
while( my( $column_name ) = $sth->fetchrow_array( )){
push @columns, $column_name;
}
$sth->finish( );
b.
"Anthony E." wrote:
> I need to read the fields of a table dynamically using
> DBI.pm
>
> The resulting cgi script should be a form that has a
> checkbox for each field...the user will then create a
> temporary table based on which fields are checked in
> the form.
>
> =====
> --
> Anthony Ettinger
> [EMAIL PROTECTED]
> 415-504-8048
> http://chovy.com/resume.doc
>
> __________________________________________________
> Do You Yahoo!?
> Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
> http://im.yahoo.com
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
--
Bill Adams
TriQuint Semiconductor
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php