Jump to content

Recommended Posts

I am trying long time to get a auto ban system working for me game, but I fail with it.

me database looks like this

naamloosbi.png

 

What he must do=

he must look in the  "user_bag" under "character"

where wIndex='(some value)'

if he find one, he must look to he's character_no (its a colomn in user_bag)

and remember that character_no

 

when he got the character_no

he must find that character_no in the "user_character" under "character".

and add [GM] on the front of the character_name (colomn in user_character)

 

what I made self (not working :D) is this


set ANSI_NULLS ON 
set QUOTED_IDENTIFIER ON 
go 



/* 
Name: Anti-GM-ITEMS 

Version: Beta V1.0 

*/ 
AS 

DECLARE @character_name varchar(40); 
DECLARE @character_no varchar(50); 


SELECT 
    @character_name    = character_name, 
    @character_no     = character_no 
FROM character.dbo.user_bag 
WHERE 
    wIndex='64988' 
; 

if (@character_name IS NOT NULL) 
BEGIN 

    SELECT FROM character.dbo.user_bag 
    WHERE character_no = @character_no; 

    SELECT @character_name    = character_name 
    FROM account.dbo.user_character 
    WHERE 
        character_no = @character_no; 


END;

Link to comment
https://forums.phpfreaks.com/topic/196228-help-mssql-query-more-databases/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.