Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.54 KB | None | 0 0
  1. class User{
  2.  
  3.     function getChars($account)
  4.     {
  5.         $res = DBExec("SELECT char_name,level FROM characters WHERE account_name = '$account'");
  6.         if(!$res){
  7.             return false;
  8.         }
  9.         $charData = array();
  10.         while($row = mysql_fetch_array($res)){
  11.             if(!$row['char_name']){
  12.                 return false;
  13.             }else{
  14.                 $charData['charName'] = $row['char_name'];
  15.                 $charData['charLevel'] = $row['level'];
  16.             }
  17.         }
  18.         return $charData;
  19.     }
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement