If you use a model name, the table refered to the model is within the tableName() function (in brackets {{table}} when you use table prefix (main.php config file)
If you wish to access the table name of a model, other than t I use: {{table}} within CDbCommands or with composite conditions: ‘condition’=>'t.id IN (SELECT field1.id FROM {{modeltablename}}) in CDbCriteria classes.
NOTE: you dont need to use brackets if your table does not have prefixes (even with them, it is actually made in case you change the prefix you dont need to go throughout all the models to change their table names, just by changing the tableprefix in main.php will do it)
'condition' => 'isVisible = 1 AND
( type <> 7 OR {{fc_eventLogs}}.idUser <> '.$this->logged_user->idUser.' ) '
Tried it, but doesn’t work:
Syntax error or access violation: 1064 You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the right syntax to use near
'{fc_eventLogs}}.idUser <> 3 ) )' at line 1
PS: thinkt4nk: Ok, that way I get the alias of the main table, which is the same as using t, but as there are 3 tables joined here, how can I reference the other two?