[eluser]Unknown[/eluser]
In a similar situation with the odbc driver and Microsoft Sql Server I had to modify _from_tables in odbc_driver.php for 1.7.0 from:
function _from_tables($tables)
{
if ( ! is_array($tables))
{
$tables = array($tables);
}
return '('.implode(', ', $tables).')';
}
to
if ( ! is_array($tables))
{
$tables = array($tables);
}
if (count($tables) > 1)
{
return '('.implode(', ', $tables).')';
} else {
return $tables[0];
}
I noticed that mssql_driver had the same sql construct as odbc_driver. MSSQL doesn't like statements like:
select * from (tablename)
Also I noticed that escape_str in odbc_driver.php tries to call _remove_invisible_characters (right below a comment that says "odbc doesn't require escaping" so I had to take that out too.
I've been using CI on mysql well for the last few weeks at home but have to use MSSQL at work. Should I just avoid active record altogether for MSSQL?
- Dave