Is it possible to use placeholders in an order by clause?  The code
below executes fine but is not sorted correctly.

$sth = $dbh->prepare("SELECT projectnumber, companyname, engineer
                                                 FROM project
                                                WHERE projectmanager =
'$fullname' AND projectclass = 'Active'
                                                ORDER BY ?");

$sth->execute(projectnumber);

Obviously I will replace "projectnumber" in the execute statement with a
variable if/when the above works.  I have used placeholders successfully
in other areas so I know they work with my db.

MS Access
NT4
Active Perl

Thanks for any help!

--
Steven J. Berlage
System Administrator
ENTEGEE Engineering Technical Group
ph: 319.582.7482 x228
[EMAIL PROTECTED]


Reply via email to