this works.
my $sth = $dbh->prepare( 'select * from mytable order by col_3' ) or die DBI->errstr; $sth->execute() or die DBI::errstr; while( my $aref = $sth->fetch ) { print "@$aref"; }
this doesn't?
my $sth = $dbh->prepare( 'select * from mytable order by ?' ) or die DBI->errstr; $sth->execute( 'col_3' ) or die DBI::errstr; while( my $aref = $sth->fetch ) { print "@$aref"; }
In reply to DBI order by clause and placeholders by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |