
proHappyJim
-
Posts
3 -
Joined
-
Last visited
Posts posted by proHappyJim
-
-
Great! That is how I was leaning. I am already seeing so much speed improvement going to PHP 7. I would rather have the convenience of prepared statements at this point.
Thanks again! I am enjoying getting more clear on jQuery at the moment. I am really grateful for great books like yours.
Jim
-
Hi Larry,
I am loving the book, as I work towards converting lots of Classic ASP to PHP 7.
I have in the past created hundreds of Stored Procedures in MSSQL. One thing that has bugged me in the past was that I found it hard to search for variables, etc., in the Stored Procedures when I changed something.
In addition to liking the fact that they will be in my (easily searchable) code, I like the security and performance perks of using Prepared Statements as I translate these Stored Procedures... but I am wondering:
Would Stored Procedures or Stored Functions be faster than Prepared Statements?
Again, thank you for making such an excellent book - it's really helping me get up to the next level in my coding abilities.
Thanks,
Jim
Prepared Statements Vs Stored Procedures Vs Stored Functions
in PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (5th Edition)
Posted
Larry, I have a follow up question. As one forum comment puts it "To be worth the overhead, each prepared statement must be executed more than once (such as in a loop). If a query is executed only once, more overhead goes into preparation of the prepared statement... I would use a prepared statement, but only if I had to repeatedly make the same query multiple times in the same session."
Is this true? Should I just use regular db calls (inline SQL) unless the statement will be called multiple times (in a loop)?
Thanks so much!