SQLSTATE[42S22]: Column not found: 1054 Unknown column 'u.table' in 'on clause' The SQL being executed was: SELECT `c`.* FROM `core_contents` `c` LEFT JOIN `core_options` `optiads` ON optiads.pid_option=c.id and optiads.table_name=u.table and optiads.field_name='ads' WHERE (`c`.`id_unit`='44') AND (`c`.`is_vis`=1) AND (`c`.`date_start` < '2021-06-21 12:42:03') AND (`optiads`.`option_value`=231) GROUP BY `c`.`id` ORDER BY `c`.`date_start` DESC LIMIT 4