It is over head, but it caches the execution plan for multiple runs of the
script. So different users with different data will use the same cached
query on the database. Saving processing time. It also prevents SQL
injection on the fly because you are indicating what data type each place
holder will need to accept.

No, it's per session.

http://dev.mysql.com/doc/refman/5.0/en/sql-syntax-prepared-statements.html

The scope of a prepared statement is the client session within which it is created. Other clients cannot see it.


Well he probably meant that the mysql server will cache the query and that is true. But I think that mysql uses the cache only if the query is the exact same...

So it does no good in this case.

--
Thodoris


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to