Hi, i need to connect with my database using Pear::DB, but when i use
"var $default = array('driver' => 'pear-mysql', ...", an error occurs.
I tried to use PEAR::DB when I first started with cake.
One tip is to make sure to require_once your pear libraries from the bootstrap.php file.
I was never really able to get the database driver to work for pear db, but I soon realized that I did not need it for the main application.
If I needed to connect to pear db or other libraries that used pear db to query I could create the class in the particular controller and pass it a dsn to connect.
I created a snippet in on CakeForge that will generate the dsn from the current configuraiton to give to pear db when you want to use it.
http://cakeforge.org/snippet/detail.php?type=snippet&id=115
I think this approach will work better for you since Cake's native database drivers work very well with mysql. Only use Pear when you absolutely have to.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
