Pb with select_max() with ibase |
[eluser]bkarat[/eluser]
Hi ! I have the following stmt in my code: $this->db->select_max('FINSHORT'); I get the following error while running: Fatal error: Call to undefined method CI_DB_ibase_driver:elect_max() in........ I am using Firebird. Is it a known pb or I am using an old driver? Where do I get the latest ibase drivers? Thanks in advance With regards, Bala
[eluser]bkarat[/eluser]
Hi ! Thank you very much for yr reply. Yes, we had downloaded the ibase files from the same location. We are using the latest codeigniter download (1.7.0). Now we remember that we had a problem with the downloaded DB_active_rec.php. The system was always giving a problem. Then one of our programmers replaced this with an earlier version and found it was working. I just now confirmed that select_max is not available in this file. But then I tried to replace the file with the latest one and we are getting the following error: Fatal error: Call to undefined method CI_DB_ibase_driver::_protect_identifiers() in ......\system\database\DB_active_rec.php on line 429 Any help would be appreciated. With regards, Bala
[eluser]pistolPete[/eluser]
Function _protect_identifiers is located in ./system/database/DB_driver.php. There is a README.txt in DB_ibase.zip: Quote:Installation Instructions: The packaged DB_driver.php does not contain the function _protect_identifiers. protect_identifiers was added in CI 1.6.0, so you are using a version of the file which is pretty old.
[eluser]bkarat[/eluser]
Hi ! I am sorry, I am confused. Where do I get the latest DB_driver.php from? From codeIgniter folder only? I copied the DB_driver.php and DB_active_rec.php from codeIgniter folder and was still getting another problem. Just now I downloaded 1.7.1 version and copied all the database files to my project (the ibase file remains the same). When I run the project, I get the following error: Fatal error: Call to undefined method CI_DB_ibase_driver::_db_set_charset() in C:\wamp\www\Payroll21\system\database\DB_driver.php on line 171 Pl help. With best regards, Bala
[eluser]pistolPete[/eluser]
I am confused as well because of your use of strange abbreviations Quote:Where do I get the latest DB_driver.php from?http://dev.ellislab.com/svn/CodeIgniter/.../database/ The ibase drivers were developed some time ago, since then the database layer has changed somehow. That's why these drivers do not really work anymore... You have to adjust the ibase drivers. Look e.g. at the mysql driver and add any missing functions to the ibase driver. For example, this function is missing in your driver: Code: function db_set_charset($charset, $collation)
[eluser]bkarat[/eluser]
Hi ! Thanks a lot. So, it may be a better bet to use only standard queries (not the codeIgniter style) with Firebird, for the time being? With regards, Bala
[eluser]pistolPete[/eluser]
Well it shouldn't be too hard for you to create those missing functions. Just look at an existing driver and write an equivalent to it. Using the database abstraction layer CI provides you gain much portability of your application in the event of having to change your database server. I even think it looks "cleaner" to me.
[eluser]bkarat[/eluser]
Thanks. Definitely I will try this. With best regards, Bala |
Welcome Guest, Not a member yet? Register Sign In |