I have a table with user log data. And I want user email to be displayed in list view next to each record. I've defined SQL query in fields.ini
- Code: Select all
__sql__ = "SELECT UL.*, U.email FROM user_log UL LEFT JOIN user U ON UL.user_id=U.id"
The query looks to me just like this one, but I get an error
Fatal error: Failed parsing SQL query on select: SELECT UL.*, U.email FROM user_log UL LEFT JOIN user U ON UL.user_id=U.id . The Error was Parse error: Unexpected clause on line 1 SELECT UL.*, U.email FROM user_log UL LEFT JOIN user U ON UL.user_id=U.id ^ found: "user" in T:\home\smartgsm.local\www\xataface\lib\SQL\Parser.php on line 1752
I've tried also using a delegate method, but I have the same error. MySQL itself executes this query perfectly.
- Code: Select all
__sql__ = "SELECT * FROM user_log"