Fork me on GitHub

pnVarPrepForStore  Bottom

  • Is there a reason why pnVarPrepForStore has been moved out of the SQL statements and into a list prior to the SQL statements in the Example module?

    The Template module used pnVarPrepForStore right in the SQL statement and that seems like the more efficient method. I am not sure why this was changed, unless it presents a security flaw.
  • This was a case of simplifying the code a little bit to aid readability. All the pnVarPrep* API's handle arrays as input and will act accordingly on each element of that array. So it made sense to call pnVarPrepForStore once with each of the values. This simplifies the SQL statement by having the data pre-prepped for the database

    -Mark

    --
    Visit My homepage and Zikula themes.
  • Thanks Mark. I wonder if improving the simplicity of the SQL statement (having the data pre-prepped for the database) translates into improved performance. It must, but then how would one measure this, read/write time of SQL execution?
  • Given all of the work is done before supplying the query to adodb there is actually no difference to performence. The use of pnVarPrepForStore in the SQL statement of the template module doesn't make any difference to ADODB. There may be a minor performence improvement by only calling pnVarPrepForStore only once but the difference will be minor.

    -Mark

    --
    Visit My homepage and Zikula themes.
  • 0 users

This list is based on users active over the last 60 minutes.