Please tell me what is wrong with the code?
I get the error: Unknown column 't.entry_id' in 'on clause'
I understand the problem in the line LEFT JOIN exp_category_posts ON t.entry_id = exp_category_posts.entry_id
Here is the full request.
SELECT t.entry_id AS entry_id , t.title AS title , t.weblog_id, t.url_title AS url_title , t.entry_date AS entry_date,COUNT(*) FROM exp_weblog_titles AS t ,(select title ,entry_date ,entry_id from exp_weblog_titles where weblog_id=3 ) as newsreal LEFT JOIN exp_category_posts ON t.entry_id = exp_category_posts.entry_id WHERE newsreal.title LIKE CONCAT('%', t.title, '%') AND t.site_id IN ('1') AND t.status = 'open' AND t.weblog_id = 13 AND newsreal.entry_date > UNIX_TIMESTAMP() - 3600*24*7 AND exp_category_posts.cat_id = 59 GROUP BY title ORDER BY COUNT(*) DESC LIMIT 20
tthat the left join really divided the tables that are in on (although this is strange) - Mike