By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,099 Members | 2,156 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,099 IT Pros & Developers. It's quick & easy.

prepared statements in mysqli?

P: n/a


hello!

mysqli in PHP5 comes with prepared statements functionality. However,
without persistent connections or connection pooling in this code
library, one has to ask: why bother?

are prepared statements 'remembered' by the server for a while between
connections, so that new connections can take advantage of them, or are
they really only useful for those pages/requests that are executing a
huge amount of DML in a single shot.
thanks!
mark.
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
> mysqli in PHP5 comes with prepared statements functionality. However,
without persistent connections or connection pooling in this code
library, one has to ask: why bother?

are prepared statements 'remembered' by the server for a while between
connections, so that new connections can take advantage of them, or are
they really only useful for those pages/requests that are executing a
huge amount of DML in a single shot.


I believe that prepared statements come with implicit quoting for
substituted values, so you don't have to fill your code with calls
to addslashes(), or risk SQL errors (and maybe your site getting
hacked) when someone decides to put single quotes or other nasty
characters into a web form. This may prove to be useful even if
no prepared statement is ever used more than once.

Gordon L. Burditt
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.