[eluser]flogiston[/eluser]
Hi,
Had the same problem and looked a bit deeper. The problem lies in the mysql driver: it incorrectly adds backticks(`) arround the '*' so MySQL thinks '*' is the name of a field.
SELECT `ez_users`.`id` as id,
`ez_users`.`*`, `ez_auth`.`activation_code` FROM ...
should be
SELECT `ez_users`.`id` as id,
`ez_users`.*, `ez_auth`.`activation_code` FROM ...
I modified the file "system\database\drivers\mysql\mysql_driver.php", function _escape_identifiers (line 441) so it only escapes the table name, not the '*':
I basically changed line 441 from
Code:
$str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char;
to
Code:
if($this->_endsWith($item, '.*'))
{
$str = $this->_escape_char.str_replace('.', $this->_escape_char.'.', $item);
} else
{
$str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char;
}
I also added the function _endsWith below the function _escape_identifiers:
Code:
function _endsWith($haystack, $needle){
return strrpos($haystack, $needle) === strlen($haystack)-strlen($needle);
}
I know we shouldn't be modifying the core, but this seems to be a bug in the mysql_driver IMHO as it generates invalid sql.
HTH
[quote author="mdriscol" date="1230605086"]I tried the extend library class described in the linked post. I even edited the Session class directly and changed the affected lines but it still didn't fix it. I still get the same error when trying to log into ez_auth. How did you get it to work??[/quote]