Latest posts - multiple boards (General)
Hi
I am trying to show the latest posts from my site - which uses multiple boards - on the index page.
For example I have one board that uses 'A_entries' to store its posts, and another which uses 'B-entries' to store its posts. This all works fine (for over 100 different boards).
I would like to show the latest posts taken from any board. However I have hit a brick wall when it comes to adjusting the relevant code. N.B - All users for all boards are in 'mlf2_userdata'
I am adjusting this code (e.g - for A_entries only) in index.inc.php:
$latest_postings_result = @mysqli_query($connid, "SELECT id, pid, tid, name, user_name, A_entries.user_id, UNIX_TIMESTAMP(time) AS time, UNIX_TIMESTAMP(time + INTERVAL ".intval($time_difference)." MINUTE) AS timestamp, UNIX_TIMESTAMP(last_reply) AS last_reply, subject FROM (A_entries) LEFT JOIN mlf2_userdata ON mlf2_userdata.user_id=A_entries.user_id WHERE spam=0 ORDER BY time DESC LIMIT 3") or raise_error('database_error',mysql_error());
It would be much appreciated if I could get some guidance to solve this. My MySQL knowledge just isn't up to the challenge yet! I've been trying wildcard statements with regard to *_entries but no joy yet.
Thanks in advance
Andy