+ 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

@@ -69,7 +69,7 @@ if(isset($_GET['mode']))
$_POST['delnick']='';
}
$sql = "SELECT `g_id`, `name`, `desc`, `m_id` FROM `".GROUPS_TABLE."` WHERE `g_id`='$gid'";
$group = mysql_fetch_array(DataBase::sql_query($sql, 'GENERAL', 'Could not obtain groups information.'));
$group = DataBase::fetch(DataBase::sql_query($sql, 'GENERAL', 'Could not obtain groups information.'));
if ($group['g_id']=='')
{
message_forum($lng['no_group'], 'index.php');
@@ -90,10 +90,10 @@ if(isset($_GET['mode']))
include('./skins/'.$default_skin.'/group_view_head_body.tpl');
$sql = "SELECT ".USERS_GROUP_TABLE.".*, ".USERS_TABLE.".* FROM `".USERS_GROUP_TABLE."` LEFT JOIN ".USERS_TABLE." ON ".USERS_TABLE.".u_id =".USERS_GROUP_TABLE.".u_id WHERE `g_id`='$gid'";
$query = DataBase::sql_query($sql, 'GENERAL', 'Could not obtain users in groups information.');
$amout = @mysql_num_rows($query);
$amout = DataBase::num_rows($query);
if ($amout>0)
{
while($result = mysql_fetch_array($query))
while($result = DataBase::fetch($query))
{
$skin = array(
'id'=>$result['u_id'],
@@ -143,9 +143,9 @@ else
include('./skins/'.$default_skin.'/overall_header.tpl');
$sql = "SELECT `g_id`, `name`, `desc` FROM `".GROUPS_TABLE."` ORDER BY `sort`";
$query = DataBase::sql_query($sql, 'GENERAL', 'Could not obtain groups information.');
if (@mysql_num_rows($query)>0)
if (DataBase::num_rows($query)>0)
{
while($item = mysql_fetch_array($query))
while($item = DataBase::fetch($query))
{
$skin = array(
'g_id'=>$item['g_id'],