Hi,
I'm trying to create a block that gets the most recent 6 threads from my invision database...
the
PHP code to do this is:
<?php $ModName =
basename( dirname( __file__ ) );
modules_get_language
();
$db =
mysql_connect("localhost",
"username",
"password");
mysql_select_db("mydb",
$db);
$currThreads_getThreads = @
mysql_query("SELECT tid, title FROM ibf_topics WHERE forum_id = '22' AND state = 'open' ORDER BY last_post DESC LIMIT 8");
?><table cellspacing=
"0" cellpadding=
"0">
<tr>
<td>
<UL TYPE=
"DISC">
<?php while($currThreads_theseThreads = @
mysql_fetch_array($currThreads_getThreads)) { echo "<LI><a href='http:\www.myfoforum.com\forum\index.php&t=".
$currThreads_theseThreads["tid"].
"' style='color:white;'><small>".
$currThreads_theseThreads["title"].
"</small></a></LI>";
}?> </UL>
</td>
</tr>
</table>
i put that code in a module/directory called currThreads; I'm unsure how I would create a block to display this information; or if I have the wrong stuff in the module (or if i need a module at all)
i think trying to get info from another database other than
PN's will be a problem? any help will be appreciated