Purtroppo niente.
Query:
codice:
SELECT id_commento_news,
max(case when tab = 1 then data_commento else null end) as data_commento_news,
max(case when tab = 2 then data_commento else null end) as data_commento,
max(case when tab = 1 then nome_utente else null end) as nome_utente,
max(case when tab = 2 then nome_utente else null end) as nome_utente,
max(case when tab = 1 then email_utente else null end) as email_utente,
max(case when tab = 2 then email_utente else null end) as email_utente,
max(case when tab = 1 then ip_address else null end) as ip_address,
max(case when tab = 2 then ip_address else null end) as ip_adress_ricette,
max(case when tab = 1 then commento_news else null end) as commento_news,
max(case when tab = 2 then commento_news else null end) as commento_ricetta
from (
select id_commento_news, data_commento_news, nome_utente, email_utente, ip_address, commento_news,1 as tab from commenti_news
union
select id_commento, data_commento, nome_utente, email_utente, ip_adress_ricette, commento_ricetta,2 as tab from commenti_ricette
) as tab
group by id_commento_news
Errore:#1054 - Unknown column 'data_commento' in 'field list' Ma è strano perchè quella tabella esiste.