+ 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:
10
includes/cache/cache_topic.php
vendored
10
includes/cache/cache_topic.php
vendored
@@ -13,7 +13,7 @@ if(!defined('IN_uF'))
|
||||
}
|
||||
//||topic.php script cache ------------------------------------------------------------------------------
|
||||
$sql = "SELECT ".TOPICS_TABLE.".*, ".TOPICS_TABLE.".name AS topic_name, ".TOPICS_TABLE.".lock AS topic_lock, ".FORUMS_TABLE.".* FROM ".TOPICS_TABLE." LEFT JOIN ".FORUMS_TABLE." ON ".TOPICS_TABLE.".f_id = ".FORUMS_TABLE.".f_id WHERE `t_id`='$tid' LIMIT 1";
|
||||
$result = @mysql_fetch_array(DataBase::sql_query($sql,'GENERAL','Could not obtain forum information'));
|
||||
$result = DataBase::fetch(DataBase::sql_query($sql,'GENERAL','Could not obtain forum information'));
|
||||
if ($result['t_id']=='')
|
||||
{
|
||||
message_forum($lng['no_topic'], 'index.php');
|
||||
@@ -30,8 +30,8 @@ $forum['moderate']=$result['moderate'];
|
||||
|
||||
$sql = "SELECT `u_id`,`value` FROM `".WARNINGS_TABLE."`";
|
||||
$query = DataBase::sql_query($sql,'GENERAL','Could not obtain user warns information');
|
||||
$result = mysql_num_rows($query);
|
||||
while ($result = @mysql_fetch_array($query))
|
||||
$result = DataBase::num_rows($query);
|
||||
while ($result = DataBase::fetch($query))
|
||||
{
|
||||
if(!isset($user_warnlevel[$result['u_id']]))
|
||||
{
|
||||
@@ -50,7 +50,7 @@ while ($result = @mysql_fetch_array($query))
|
||||
//check online for user
|
||||
$sql = "SELECT `s_id`, `u_id`, `time` FROM ".SESSIONS_TABLE." WHERE time+1250>".time();
|
||||
$query = DataBase::sql_query($sql, 'GENERAL', 'Could not read user active.');
|
||||
while($result = @mysql_fetch_array($query))
|
||||
while($result = DataBase::fetch($query))
|
||||
{
|
||||
$user[$result['u_id']]['online']='1';
|
||||
}
|
||||
@@ -81,7 +81,7 @@ else
|
||||
$limit = 'LIMIT 0, '.$limiter;
|
||||
$page=1;
|
||||
}
|
||||
$count = @mysql_fetch_array(DataBase::sql_query("SELECT COUNT(`p_id`) as `p_id`
|
||||
$count = DataBase::fetch(DataBase::sql_query("SELECT COUNT(`p_id`) as `p_id`
|
||||
FROM ".POSTS_TABLE." WHERE `t_id`='$tid'",'GENERAL','Could not obtain count amout of posts'));
|
||||
$count = $count['p_id'];
|
||||
$count = ceil($count / $limiter);
|
||||
|
||||
Reference in New Issue
Block a user