[eluser]borgir[/eluser]
This happens when the DB_active_rec.php tries to compile your SELECTed fields (_compile_select method).
It runs the _protect_identifiers method foreach of the selected columns.
However, your select statement is a function, not column(s) so the statement is exploded by commas.
Code:
[0] => date_format(checkout_date
[1] => '%d.%m.%Y') as created_date
and the _protect_identifiers method, expecting something like this:
Code:
SELECT * FROM hostname.database.table.column AS c FROM hostname.database.table
Or a query with aliasing:
SELECT m.member_id, m.member_name FROM members AS m
adds your table prefix thinking that is "compiling" something like this m.member_id here (DB_driver.php file):
Code:
// We only add the table prefix if it does not already exist
if (substr($parts[$i], 0, strlen($this->dbprefix)) != $this->dbprefix)
{
$parts[$i] = $this->dbprefix.$parts[$i];
}
For now I suggest that you use this syntax:
Code:
$res = $this->db->query( "SELECT date_format(created, '%d.%m.%Y') as created_date FROM slticket");