CodeIgniter Forums
tackling update of mysql drivers possible? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: tackling update of mysql drivers possible? (/showthread.php?tid=6055)



tackling update of mysql drivers possible? - El Forum - 02-13-2008

[eluser]ommy[/eluser]
Goodday,
I've not been using CI for very long but i felt the need to implement functionality to the mysql database driver. Is this even remotely possible? Lynch me if someone has asked such a question before. I've been searching the forum but could not find anything like it.
I deeply appolagize if my incompetent searching causes you all to roll your eyes Smile

Anyway thanks for taking intrest or even answering my question.


tackling update of mysql drivers possible? - El Forum - 02-13-2008

[eluser]xwero[/eluser]
is it this what you want to do?


tackling update of mysql drivers possible? - El Forum - 02-13-2008

[eluser]ommy[/eluser]
It would generate about the same results i guess. But i'm worried about performance.
I wanted to provide the 'fetch field data' function of this driver with extra information. But wanted to include it into this driver to minimize the impact on performance. I'll take a step back and focus on the manual's custom function use to try and solve my problem.
Thank you for pointing me back where i came from, maybe i was looking somewhat too far.

And for the sake of knowledge. Is it possible to physically extend a driver? To implement custom functions without too much hassle?
I would expect custom functions in a driver to NOT work because they're not known by CI.

back to the drawing board Smile


tackling update of mysql drivers possible? - El Forum - 02-13-2008

[eluser]xwero[/eluser]
The only way to add methods to the driver is to add them to the class.

You can extend the model and put your method in the basemodel.


tackling update of mysql drivers possible? - El Forum - 02-14-2008

[eluser]ommy[/eluser]
i've added my code to one of the driver's functions but am confident that this is not the right way to work.
I've been asking myself if it would be possible to move this code to a hook. Or are there other, better ways to achieve this?

The code works perfectly and i'm achieving my goal in terms of functionality. But being aware of the faulty implementation i cannot rest until i find the right way Smile