Hello. I have this code to grab information from database but it’s not working. The mod itself is awards im giving to my users. I have checked and it does write them to a database. But when I view them on my board, it states that users don’t have awards. Here is the code that grabs the info. Please help.
[php]<?php
require “…/conf_global.php”;
$nawards = “”;
$INFO[‘sql_driver’] = !$INFO[‘sql_driver’] ? ‘mySQL’ : $INFO[‘sql_driver’];
$to_require = “…/sources/Drivers/”.$INFO[‘sql_driver’].".php";
require ($to_require);
$DB = new db_driver;
$DB->obj[‘sql_database’] = $INFO[‘sql_database’];
$DB->obj[‘sql_user’] = $INFO[‘sql_user’];
$DB->obj[‘sql_pass’] = $INFO[‘sql_pass’];
$DB->obj[‘sql_host’] = $INFO[‘sql_host’];
$DB->obj[‘sql_tbl_prefix’] = $INFO[‘sql_tbl_prefix’];
// Get a DB connection
$DB->connect();
if (isset($mid)) {
$query=$DB->query(“select * from ibf_awards where mid = ‘$mid’”);
$nawards=mysql_num_rows($query);
$userinfo=mysql_query(“select * from ibf_members where id = ‘$mid’”);
}
?>
Awards<? if ($nawards>"0") { ?>
|
close window <? $DB->close_db(); ?>[/php]