I have a class that was written before cake. It accesses a database using mysql_connect. This class works perfectly and lot of my applications that i develop use this class.
Im transferring this class across to cake, but unfortunately it confuses cake with the db connection. >From what ive read, cake only allows 1 db connection, so as soon as I open up any connection, it loses its previous connection, and only points towards my new one. This is hazardous once you go back to making more queries outside the custom class. (please note that useDBConfig isnt possible since it is a custom class) What I have noticed is that cake prepends the database to the query when you use the predefined functions and this causes bad links. Now back to my class, I CAN rewrite it as a model to make it work with cake, but this isnt very graceful since its ignoring the whole OO design theorom, and id have to edit the database.php on every project that wants to use my new model. I want to be able to plug and play different classes into cake without rewriting them. Do I need to rewrite this class? Or is there a better way of handling these different DB connections? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
