in reply to Re: (jefffa) Re: Database Problems
in thread Database Problems

my $sth = $dbh->("SELECT ? FROM DB.Table WHERE ? = ?");
Just a portability warning: Using placeholders for column names is very specific to the DBI driver for MySQL - this will not work with Oracle, Sybase, MS-SQL, etc.

Michael

Replies are listed 'Best First'.
Re: Re: Re: (jefffa) Re: Database Problems
by dws (Chancellor) on Apr 17, 2003 at 00:35 UTC
    Using placeholders for column names is very specific to the DBI driver for MySQL

    And it's specific to current versions of MySQL. When prepared queries are supported (soon, from the sound of it), that trick won't work.