[eluser]mattalexx[/eluser]
Here's my hack (I'll extend the db class for this later, but right now, I'm hacking the core). Before:
Code:
// ci/database/DB_driver.php, line 1240:
if ($this->dbprefix != '')
Code:
if ($this->dbprefix != '' && preg_match('/^[a-z!]+\(/i', $parts[0]) !== 1)
Now, everything works if I use CI_DB_active_record::dbprefix() to escape everything.
EDIT: I put a shriek in the regex so that "!ISNULL(..." is supported as well as "ISNULL(...".