in reply to DBI order by clause and placeholders
prepare examines the structure of the query and constructs a plan for how it shall ultimately be processed.
execute runs that plan, providing any data values that may be needed to do so.
Changing an order by clause affects the way that the query is processed. It is a structural change, not a changed data value. It must, therefore, be specified at the prepare stage, when the structure of the query is established, not at the execute stage.
|
|---|