+ Changed from MySQL to MySQLi native driver.

+ Added 2 new functions in DataBase class: fetch($query) and num_rows($query)

git-svn-id: https://svn.pioder.pl/uf-svn/uF@20 72ec579a-5ced-4fa4-82f3-afba5d98df2f
This commit is contained in:
pioder
2009-05-03 10:50:00 +00:00
parent 6cc36dc266
commit b1f37b6ea5
43 changed files with 296 additions and 193 deletions

View File

@@ -19,7 +19,7 @@ class Admin_Forum
$cat = Forum::ForumInformation($fid,'c_id');
$all='';
$query = DataBase::sql_query("SELECT `name`, `c_id` FROM `".CATS_TABLE."`",'GENERAL','Could not obtain category information');
while($t = @mysql_fetch_array($query))
while($t = DataBase::fetch($query))
{
if ($t['c_id']==$cat)

View File

@@ -38,7 +38,7 @@ class Admin_Over
global $default_skin;
$all='';
$query = DataBase::sql_query("SELECT `name`, `s_id` FROM `".SKINS_TABLE."`",'GENERAL','Could not obtain skins information');
while($t = @mysql_fetch_array($query))
while($t = DataBase::fetch($query))
{
if ($t['name']==$default_skin)
@@ -104,14 +104,14 @@ class Admin_Over
{
$result = User::UserInformation($_SESSION['uid'],'skin');
$sql = "SELECT * FROM `".SKINS_TABLE."` WHERE `s_id`='$result'";
$result = mysql_fetch_array(DataBase::sql_query($sql,'CRITICAL','Could not obtain skin information.'));
$result = DataBase::fetch(DataBase::sql_query($sql,'CRITICAL','Could not obtain skin information.'));
return $result['name'];
}
else
{
$result = $forum_config['defaultskin'];
$sql = "SELECT * FROM `".SKINS_TABLE."` WHERE `s_id`='$result'";
$result = mysql_fetch_array(DataBase::sql_query($sql,'CRITICAL','Could not obtain skin information.'));
$result = DataBase::fetch(DataBase::sql_query($sql,'CRITICAL','Could not obtain skin information.'));
return $result['name'];
}
}
@@ -131,14 +131,14 @@ class Admin_Over
{
$sql = "SELECT `t_id` FROM ".TOPICS_TABLE.";";
$query = DataBase::sql_query($sql,'GENERAL','Could not obtain total posts information');
$result = mysql_num_rows($query);
$result = DataBase::num_rows($query);
return($result);
}
function TotalPosts()
{
$sql = "SELECT `p_id` FROM ".POSTS_TABLE.";";
$query = DataBase::sql_query($sql,'GENERAL','Could not obtain total posts information');
$result = mysql_num_rows($query);
$result = DataBase::num_rows($query);
return($result);
}
function GenerateHeader()