OK, what about now?
$query = "SELECT * FROM ibf_topics, ibf_posts WHERE ipf_topics.forum_id='13' AND ipf_posts.topic_id=ipf_topics.tid LIMIT 5";
$result = mysql_query($query) or die("<b>A fatal MySQL error occured</b>.\n<br />Query: " . $query . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());
The error works so don't worry about that. However it tells me that:
A fatal MySQL error occured.
Query: SELECT * FROM ibf_topics, ibf_posts WHERE ipf_topics.forum_id='13' AND ipf_posts.topic_id=ipf_topics.tid LIMIT 5
Error: (1109) Unknown table 'ipf_topics' in where clause
I double and triple checked that ipf_topics is the name of the table in the database.