Not sure what's wrong:
I keep getting:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/bloodpac/public_html/components/com_forum/extension.inc on line 33
<?php
/***************************************************************************
* extension.inc
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : [email]support@phpbb.com[/email]
*
* $Id: extension.inc,v 1.1 2005/02/14 04:03:08 websmurf Exp $
***************************************************************************/
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
$version = "v1.2.4 RC6";
//
// Change this if your extension is not .php!
//
$phpEx = "php";
global $run_as_component;
$link = mysql_connect('localhost', 'bloodpac_guest', 'guest');
if (!$link) {
die('Not connected : ' . mysql_error());
}
// make foo the current db
$db_selected = mysql_select_db('bloodpac_joom2', $link);
if (!$db_selected) {
die ('Can\'t use foo : ' . mysql_error());
}
$result = mysql_query("SELECT * FROM" . $mosConfig_dbprefix . "menu WHERE link = 'index.php?option=com_forum'");
while($data = mysql_fetch_array($result)) {
$id = $data['id'];
}
if($run_as_component){
define("basefile", "index.php?option=com_forum&Itemid=" . $id . "&");
}
else{
define("basefile", "index2.php?option=com_forum&Itemid=" . $id . "&");
}
$starttime = 0;
?>
I'm kind of new to this and not sure what my mistake is