Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: DBI order by clause and placeholders

by dsheroh (Prior)
on Jun 11, 2013 at 09:27 UTC ( #1038224=note: print w/replies, xml ) Need Help??

in reply to DBI order by clause and placeholders

Meditate for a moment upon the distinct functions of prepare and execute.

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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1038224]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2018-02-21 23:12 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (288 votes). Check out past polls.