to reduce the number of SET NAMES queries add a static boolean
variable to your AppModel an set it to false. Check the value of the
variable in your constructor and execute SET NAMES only, if it has not
been done before. E.g.
class AppModel extends Model{
static $utf8IsSet = false;
function __construct(){
if(!self::$utf8IsSet) {
$this->execute("SET NAMES 'utf8'");
self::$utf8IsSet = true;
}
parent::__construct();
}
}
--
e> [EMAIL PROTECTED]
w> http://andreas-waidelich.de
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---