note 103730 added to mysqli.prepare
| From: | Codeguy at osu1 dot php dot net | Date: | Sat, 30 Apr 2011 02:39:51 +0000 |
| Subject: | note 103730 added to mysqli.prepare | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-179296@lists.php.net to get a copy of this message | ||
The actual purpose to use a prepared statement in sql is to cut the cost of processing queries; NOT
to separate data from query. That's how it's being used w/ php NOW, not how it was
designed to be used in the first place. With SQL you cut the cost of executing multiple similar
queries down by using a prepared statement.. Doing so cuts out the parsing, validation and most
often generates an execution plan for said query up front. Which is why they run faster in a loop,
than their IMMEDIATE Query cousins do. Do not assume that just because someone uses php and this
function this way does not mean that it is THE way, or only way to do it. Although it is more secure
than general queries but they are also more limited in what they can do or more precisely how you
can go about doing it.
----
Server IP: 194.8.30.16
Probable Submitter: 79.168.125.100
----
Manual Page -- http://www.php.net/manual/en/mysqli.prepare.php
Edit -- https://master.php.net/note/edit/103730
Del: integrated -- https://master.php.net/note/delete/103730/integrated
Del: useless -- https://master.php.net/note/delete/103730/useless
Del: bad code -- https://master.php.net/note/delete/103730/bad+code
Del: spam -- https://master.php.net/note/delete/103730/spam
Del: non-english -- https://master.php.net/note/delete/103730/non-english
Del: in docs -- https://master.php.net/note/delete/103730/in+docs
Del: other reasons-- https://master.php.net/note/delete/103730
Reject -- https://master.php.net/note/reject/103730
Search -- https://master.php.net/manage/user-notes.php