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.
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 07:01 AM
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 06:41 AM
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 06:27 AM
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 01:29 AM
- mdee created topic »How to implement returnpage ?« 01:00 AM
- nestormateo responded to »Fillters in Clip« 24. May
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 24. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
pnVarPrepForStore
-
- Rank: Team Member
- Registered: Mar 18, 2002
- Last visit: Oct 21, 2009
- Posts: 6606
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. -
**unknown user**
- Rank: Freshman
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 52
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? -
- Rank: Team Member
- Registered: Mar 18, 2002
- Last visit: Oct 21, 2009
- Posts: 6606
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.
- Moderated by:
- Support
Users on-line
- 0 users
This list is based on users active over the last 60 minutes.
