Salve a tutti.
Ho un problema di compatibilità tra Mysql 5.1 e mysql 4.1.7-standard.
Vi spiego meglio:
codice:
SELECT threads.id_thread, threads.chiuso, threads.visibile, posts.*, utenti.nick, 
MAX(th_posts.data_ora) FROM threads INNER JOIN posts ON (threads.id_thread 
= posts.thread_ref) INNER JOIN utenti ON (posts.utente_ref = utenti.id_utente) 
LEFT JOIN posts AS th_posts ON (th_posts.thread_ref =threads.id_thread) WHERE 
threads.visibile = 1 AND posts.is_thread = 1 AND posts.visibile = 1 GROUP BY 
posts.data_ora ORDER BY MAX(th_posts.data_ora)
Questa query su Mysql 5.1 (in locale) funziona correttamente anche se ho qualche dubbio sulla sua correttezza ( :master: ). Caricato il DB in remoto (su mysql 4.1.7-standard) mi da problemi sulla clausola ORDER BY, infatti non supporta l'ordinamento per MAX(th_posts.data_ora).
Mi servirebbe una query alternativa avete qualche consiglio?
Spero in un vostro aiuto.
Un saluto e grazie.