Hi!
I am just creating an installer for a cake application.
It uses a tableless model and after the user input his DB connection
details I test the connection to the new database using this code.
$db = &ConnectionManager::create('test',array('driver'
=> $postdata['installation']['dbType'],
'persistent' => false,
'host' =>
$postdata['installation']['dbHost'],
'port' =>
$postdata['installation']['dbPort'],
'login' =>
$postdata['installation']['dbUsername'],
'password'
=> $postdata['installation']['dbPassword'],
'database'
=> $postdata['installation']['dbDBName'],
'schema'
=> '',
'prefix'
=> $postdata['installation']['dbPrefix'],
'encoding'
=> 'UTF-8'));
if ($db->connected) {....
It works fine except that i have no information why the connect
attempt fails. I just know it failed by checking if the DB is
connected or not. What i would like to show to the user is the warning
message the DBis giving back (and which is outputted when debug mode
is activated.
The $db->error property is empty btw, so that is not the solution.
Thank you for any help!
Carsten
--~--~---------~--~----~------------~-------~--~----~
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]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---