1
I am making a module similar to Mith's team module, which I have been combing through for a guild website for Final Fantasy XI.
I have created a table in the database with 1 line of information, and now I am trying to pull that information out of the database for display on a template.
Using the functions I have found, I should be able to pull information out of the database for display, but I am not getting any result.
Do I have to put information in somewhere before XOOPS will use that table in the database?
in my functions.php I have this;
function getMembers() {
global $xoopsDB;
$value = array();
$sql = "SELECT ID, character FROM ".$xoopsDB->prefix("ffxi_manager")." WHERE ID = 1";
$dbresult = $xoopsDB->query($sql);
$member = $xoopsDB->fetchArray($dbresult);
$value["ID"] = $member["ID"];
$value["character"] = $member["character"];
return $value;
}
And in my index.php I use this;
$roster = getMembers();
echo "||X:".$roster["character"]; // Testing Purposes
Of course the echo is just a temporary thing just to see if its retrieving database information, which it is not..
In the database the field character is a VARCHAR field, and ID is a INT field with auto_increment on.
I hope thats all the info you need... Thanks for the advice..