Integrating CI with Pear DB class |
[eluser]Myles Wakeham[/eluser]
I'm trying to inherit some open source code from another developer to work with a MySQL database. My goal is to turn his class into a library function in CI so that I can use it in multiple CI projects I'm working on. The code includes the Pear DB library, so either I have to go through his code line by line and re-write it to work with the CI database connection classes, or find a way to get Pear DB to work inside of CI. On first glance there seems to be some naming conflicts in there between CI's database classes and Pears. Out of interest, has anyone had to do a similar thing with Pear DB and CI together before? I'm curious as to the level of effort that was involved in making classes written for Pear to work inside of CI. Thanks in advance for any suggestions. Myles
[eluser]Vik[/eluser]
Perhaps someone else can answer the specific question about Pear DB. But, using CI's database stuff is really easy. It may not take much time to transfer the source code database calls, from Pear to CI.
[eluser]maadmac[/eluser]
[quote author="Vik" date="1198206362"]Perhaps someone else can answer the specific question about Pear DB. But, using CI's database stuff is really easy. It may not take much time to transfer the source code database calls, from Pear to CI.[/quote] Ditto. Honestly I think that's your best bet.
[eluser]Rick Jolly[/eluser]
Stick with PEAR DB. If the existing code uses it, you shouldn't have to change anything except maybe the include path. I don't think you'll have any problem with naming conflicts since PEAR DB is object oriented.
[eluser]danfreak[/eluser]
Try this solution: - How to include external libraries Or simply add the Code: //Windows in your root folder index.php file In fact the index.php file works as a bootstrap. Dan |
Welcome Guest, Not a member yet? Register Sign In |