Working with MySQL lately, from PHP, I am wondering about this:
- What is the performance impact by using
mysql_real_escape_string()
multiple times at a script? - Is it worth to try to reduce the number of calls to this function for a given script?
- Does it determines the character set of the connection each time is called, or this value is cached?
If a scenario is needed, I'm thinking about PHP, and distinction between text and numbers, where numbers (using intval()
, floatval()
or direct casts) can be included without a call.