Thanks for the tip. This I my first try at using CakePHP so I'm sorry to
ask newbie questions - but I still don't get it to connect properly to the
database.
The problem is that the database itself has a period in in. As far as I can
see this is set in a config variable: $config['database']. It is used
several times in Model/Datasource/Database/Mysql.php. But I can't find a
good place to set it so that I don't have to make changes everywhere that
the config['database'] value is used.
I tried injecting the escaped database name in
Model/Datasource/Datasource.php after line 284 like this:
public function setConfig($config = array()) {
$this->config = array_merge($this->_baseConfig, $this->config, $config);
$this->config['database'] = '`sofialinnea.se`';
}
But this seems to mess up my connection and instead I get this error:
*Error: *SQLSTATE[42000] [1044] Access denied for user 'XXX'@'YY.YY.YY.%'
to database '`XXX.se`' requires a database connection
Is there a better place to inject the escaped database name?
/Johan
Den torsdagen den 20:e september 2012 kl. 18:00:35 UTC+2 skrev AD7six:
>
> Know that cake doesn't escape strings that are already escaped.
>
> So if you inject '`got.dot`' somewhere appropriate (maybe just put it in
> useTable) you can work around having a db with table names that are
> problematic.
>
> AD
>
--
Like Us on FacekBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en.