+ 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

@@ -25,7 +25,7 @@ class User
{
$sql = "SELECT `$inf` FROM ".USERS_TABLE." WHERE u_id='$uid';";
$query = DataBase::sql_query($sql,'GENERAL','Could not obtain user information.');
$result = mysql_fetch_array($query);
$result = DataBase::fetch($query);
$result = $result[$inf];
return $result;
}
@@ -33,7 +33,7 @@ class User
function UserIdByNick($nick)
{
$sql = "SELECT * FROM `".USERS_TABLE."` WHERE `nick`='$nick';";
$result = mysql_fetch_array(DataBase::sql_query($sql,'GENERAL','Could not obtain user information.'));
$result = DataBase::fetch(DataBase::sql_query($sql,'GENERAL','Could not obtain user information.'));
$result = $result['u_id'];
/*if ($result=='')
{
@@ -120,7 +120,7 @@ class User
{
$sql = "SELECT * FROM ".USERS_TABLE." WHERE u_id='$uid'";
$query = DataBase::sql_query($sql,'GENERAL','Could not obtain user`s rank information.');
$result = mysql_fetch_array($query);
$result = DataBase::fetch($query);
$rank = $result['rank'];
if (($rank=='1') or ($rank=='2'))
{
@@ -194,7 +194,7 @@ class User
if($uid>0)
{
$sql = "SELECT count(*) as `m_id` FROM ".PM_INBOX_TABLE." WHERE `u_id`='$uid' AND `read`='0'";
$result = mysql_fetch_array(DataBase::sql_query($sql,'GENERAL','Could not obtain amounts PM of User.'));
$result = DataBase::fetch(DataBase::sql_query($sql,'GENERAL','Could not obtain amounts PM of User.'));
$result = $result['m_id'];
if ($result>0)
{