Welcome Guest, Not a member yet? Register   Sign In
Problems with ODBC and Active Record
#1

[eluser]carlosgoce[/eluser]
Hello,

first of all, sorry for my english.

i have a DBase with a ODBC, it's working with pdo or odbc php functions.

I'm beginning with Code Igniter and i need to use the odbc database. The thing is, at first, i have to change the odbc driver file:
Code:
return '('.implode(', ', $tables).')'; //before
return implode(', ', $tables);  //now

Because the querys were something like "SELECT name FROM (table)" and odbc didnt works with this query.

Ok, now it seems its working but i dont like to modify the system files of ci, i don't know if this is right.

But now when i try to get a query like that:
Code:
$query = $this->db->get('table', 10);

It's not returning only 10 rows, the query returns every single row that the table contains, the whole table.

So maybe i need to change things again on the odbc driver ? because on this database the LIMIT clausule is not LIMIT, is TOP and it needs an Order By Clausule to works.

The real question. Can i use odbc or at least, odbc without active record on Code Igniter or not?

Maybe there is a workaround for get('table', 10) ?

Thank you for your attention.


Messages In This Thread
Problems with ODBC and Active Record - by El Forum - 03-13-2013, 09:59 AM
Problems with ODBC and Active Record - by El Forum - 03-14-2013, 12:34 AM
Problems with ODBC and Active Record - by El Forum - 03-14-2013, 01:07 AM
Problems with ODBC and Active Record - by El Forum - 03-14-2013, 01:23 AM
Problems with ODBC and Active Record - by El Forum - 03-14-2013, 01:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB