CI 1.6 odbc driver issues - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: CI 1.6 odbc driver issues (/showthread.php?tid=5845) |
CI 1.6 odbc driver issues - El Forum - 02-05-2008 [eluser]tonanbarbarian[/eluser] I have found 3 issues with the ODBC driver in 1.6 1. It is the only driver with a constructor. This breaks the class so that it does not return a query object correctly. The only thing that the constructor is doing is setting a default value for the _random_keyword I found it easiest to remove the constructor and place the assignment of the value to the _random_keyword in to the db_select - since it didnt have anything else to do anyway Code: // function CI_DB_odbc_driver() 2 none of my active record queries worked when I was connecting to mssql because everything was being backticked and 3 tables where being bracketed So I modified the following Code: /** What I suggest is that the odbc be looked at and make it the simplest possible standard SQL so that it will run in almost anything with no issues And an idea for things like the _from_tables and _protect_identifiers is that you could store the backtick and bracketing values as properties of the object That way at run time, if required someone could set the values to an empty string and the process would still work i.e. Code: var $_from_brackets = array('(',')'); Code: (`TABLE1`, `TABLE2`) Code: $this->_from_brackets = array('',''); Code: TABLE1, TABLE2 This would make things a little bit more configurable at run time. CI 1.6 odbc driver issues - El Forum - 05-23-2008 [eluser]Morty[/eluser] That might be the same issue as I am currently faced with. Just updated from 1.5.4 to 1.6.2, now every MSSQL query fails. I will try your solution and report back. CI 1.6 odbc driver issues - El Forum - 05-23-2008 [eluser]Jacob156[/eluser] I ran into the same problem with 1.6.2. Commented out the constructor after finding this post and everything worked great. Looking thru the bug reporter I found they already fixed the backtick problem. Using XAMPP on Windows XP. |