/** * @param string $tablename */ public static function setTablename($tablename) { self::$tablename = $tablename; }
/** * @param int $charguid - character guid * @param int $newaccountid - new account id * @param int $oldaccountid - old account id * @return bool */ protected static function charTrans($charguid, $newaccountid, $oldaccountid) { require_once(LIB_DIR . DS . 'class.user_transfer_log.php'); if ($newaccountid == $oldaccountid) return false; if ($newaccountid == 0) return false; $sql = 'UPDATE ' . self::getFullTableName() . ' SET account = :new WHERE guid = :guid'; user_transfer_log::add($charguid, $oldaccountid, $newaccountid); $result = SQL::execute(self::getConnection(), $sql, array("new" => $newaccountid, "guid" => $charguid )); if($result !== false) return true; return false; }