1
Eya,
i am creating a special custom module for a company.
Now I am trying to get the reduction percentage from the database based on the users id. However when using <{$xoops_userid}> it doesnt work.
Here is what i got already:
/* Pulling user elements from db */
$result = $xoopsDB->query("SELECT red_perc FROM xappl_users where uid = '1'");
while ($row = $xoopsDB->fetchArray($result)) {
$red_perc_out = $row['red_perc'];
}
The 1 from uid should off course be the current user.
Also when trying simple <{$xoops_userid}> in the html area it just gives "Object". Does anyone have a clue about how to solve this? I did use an extra connection with the database as I didnt know how to add a connection from XOOPS itself. But I'm working on that already..
All help is appreciated!