Go to content Go to navigation Go to search

People

Businesses

Different Models Use Different Databases 3 July 2006

If you want to use a different database configuration for different models within cakePHP, you need to specify that the connection is not persistent within the database configurations:

'connect' => 'mysql_connect', 'persistent' => false

This is a documented feature of PHP’s mySQL extension that I had never run across before. (How many times does a small web developer use multiple databases for a single application or site?)

Sphere: Related Content

Leave a Comment